httpd

corneliu edited this page Jul 23, 2013 · 3 revisions

Simple http daemon.

config

,run : {
    /**
     * Start the httpd server on the specified port
     */
    webserver : [ 'httpd', 2037 ]
[...]

routing

Requests will be routed to controllers based on the request-URI. Only the first folder is taken into account.

GET http://example.com/where/will/i/go?

will load :     

appdir/controllers/where.js

If no folder or not found then appdir/controllers/default.js gets loaded.

http instance

Every controller loaded will have a httpd flavored instance object. Read more here