![]() |
Uptooda Scripting API
|
Start a web server listening a port on 127.0.0.1. More...
#include <WebServer.h>
Public Member Functions | |
| int | bind (int port) |
| Bind a port. Pass 0 as argument to use random port. | |
| int | port () const |
| void | resource (string path, string method, function callBack, object context) |
| Register route handler. | |
| void | start () |
| void | stop () |
Start a web server listening a port on 127.0.0.1.
| int bind | ( | int | port | ) |
Bind a port. Pass 0 as argument to use random port.
| port |
| void resource | ( | string | path, |
| string | method, | ||
| function | callBack, | ||
| object | context | ||
| ) |
Register route handler.
| path | regular expression |
| method | GET, POST, etc. |
| callBack | |
| context |