A picky, opinionated server framework
npm install server-butlerServer Butler is a picky, opinionated web framework that only handles GET requests*
*It also handles files.
Install with the command npm install server-butler
Pull into your server.js file with var butler = require('server-butler')
Also require ('http') to setup your server
Set a route using butler.set(route, method, content) Each argument should be a string.
route = the intended route, ie '/' or '/hello/world'
method = 'GET', that's the only thing that works right now!
content = either a string ie 'hello world' or a filename relative to ../public
Once your routes are established, use:
http.createServer(function(req, res) {
butler.retrieve(req, res);
});
and listen on your favorite port (see the example directory). Now when you open a browser and call a registered route, you'll see the specified content!