Skip to content

A basic Web server designed around building basic REST resources on the NodeMCU IoT.

License

Notifications You must be signed in to change notification settings

mlk/nodemcu-rest-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodemcu-rest-server

A basic Web server designed arround building basic REST resources.

To use this create an array called HttpRequests with the index as the resource name and the value as an object. The object should provide a method for each HTTP method supported.

The resource name will be matched it you hit /resourcename, /resourcename/ or /resourcename/<number>

Each returns a response object with the following members.

status The HTTP status to return. content A Lua object which will be converted to JSON before being returned. headers An array of headers, index as the header name, value as the header value.

NOTE: As this requires the code and mapping to be in memory I do NOT recomemend using it for anything other than very very small web services.

About

A basic Web server designed around building basic REST resources on the NodeMCU IoT.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages