wayward

Minimal http framework with the basics.

Install: npm install wayward


app.get(route, callback)

Connect style routing. More info.

app.use(route, middleware)

Connect style middleware. More info.

app.listen(port)

Port to start app on. More info.

res.send(body, statusCode)

Slack lazy sending of HTTP responses. More info.

res.render(templateName, data)

Templating middleware for embedded javascript templates. More info

req.session[key] = value
var value = req.session[key]

Only available if a secret key has been set. - app.session(opts). More info.

app.session(opts)

Enables the client-sessions lib with options, opts.secret is required. More info.

app.template(opts)

Enables EJS templating, opts.dir is required.

app.static(opts)

Enables static file serving, opts.dir and opts.url are required.


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


View the examples


npm test