bootstrapp
v0.0.0
Published
Express boilerpate
Maintainers
Readme
bootstrapp
Express basic boilerplate. With an extra p
Install
npm install bootstrapp --saveUsage
var app = require("bootstrapp");
app.listen(1337, function() {
console.log("listening...");
});Set static
app.setStatic(__dirname+"/public");Set views + engine
app.setViews(__dirname+"/views", "jade");Define routes
app.setRoutes(function(app) {
app.get("/", function(req, res) {
res.send(200);
});
});Powered by MiddleEarth which allows you to pop in more middlewares into the stack.
Ex: body-parser
app.middlewares().before("routes", {
name: 'body-parser',
cb: bodyParser()
});Current middleware stack:
// static, this is a noop, services as a starting point to add other middlewares
{name: "static", fn: noop}// erros to handle basic error handling
{name: "error-404", cb: erros.fouro4()}
{name: "error-end", cb: erros.handler({views: app.get("views")})}License
MIT


