Wayward - Minimal http framework with the basics.
Install: npm install wayward
app.get() | app.post() | app.delete() | app.put() :
app
Connect style routing. More info.
app.use():
app
Connect style middleware. More info.
app.listen():
app
Port to start app on. More info.
res.send():
res
Slack lazy sending of HTTP responses. More info.
res.render():
res
Templating middleware for embedded javascript templates. More info
req.session[]
reqsessionkey = valuevar value = reqsessionkey
Only available if a secret key has been set. - app.session(opts)
. More info.
app.session()
app
Enables the client-sessions lib with options, opts.secret
is required. More info.
app.template()
app
Enables EJS templating, opts.dir
is required.
app.static()
app
Enables static file serving, opts.dir
and opts.url
are required.
Deps:
Additional router documentation: https://github.com/bradleyg/obedient
Additional slack documentation: https://github.com/bradleyg/slack
Additional templating documentation https://github.com/bradleyg/masonry
Additional session documentation: https://github.com/benadida/node-client-sessions
Additional static files documentation https://github.com/jesusabdullah/node-ecstatic
Examples:
Tests
npm test