SYNOPSIS
httpd = http.new(app [, path])
DESCRIPTION
This function creates a new web server instance. The server is attached to the event processor passed in app.
By default, the server will serve files from the directory /usr/lib/htdocs. The optional parameter path can be used to chose a different server root.
Initially the server is dormant. To enable it, call httpd:listen().
There is a secondary server root directory at /lib/htdocs. This is provided by the SDK and contains pages for remote system configuration, update and debug. The service homepage of the device is reachable at http://xx.xx.xx.xx/settings/. To disable the service homepage, you can either filter it dynamically with cgi:request() or disable it completely by setting the system path to nil.
RETURN VALUE
A web server instance.
NOTES
Traditionally, the variable used to hold the web server is called httpd.
EXAMPLE
>
httpd = http.new(app)