Obedient - Minimal http framework with nothing but middleware.
Install: npm install obedient
app.get():
app
Connect style routing for GET http methods. Missing routes will throw a 404.
app.post():
app
Connect style routing for POST http methods. Missing routes will throw a 404.
app.put():
app
Connect style routing for PUT http methods. Missing routes will throw a 404.
app.delete():
app
Connect style routing for DELETE http methods. Missing routes will throw a 404.
app.listen():
app
Port for server to listen on.
app.use():
app
Connect style middleware. route
is an optional field. If set, the middleware will be mounted at that particular route and the prefix will be ignored. So /public/example.js would be treated as /example.js and the middleware would only be run if URL started with /public.
Deps:
Router documentation: https://github.com/aaronblohowiak/routes.js
Examples:
Tests
npm test