tallboy
v1.2.0
Published
Class Project - Express-like router/framework
Downloads
3
Readme
tallboy
JS Framework / Express-style router
Ready-made routing for projects using the most common RESTful verbs:GET, POST, PUT, PATCH, DELETE.
Installation
npm install tallboyBasic Usage
Require in node's http module
var http = require('http'); Require the tallboy framework into your project
var Tallboy = require('tallboy'); //Tallboy is a router constructorInstantiate your own Tallboy router
var yourRouterName = new Tallboy(); Examples
Adding your own route into the framework:
YourRouterName.get('/tutorial/:id', function(req, res) { Writing a header and client response for your routes:
{'Content-Type': 'text/html'}
res.write('text');
}) Creating a server instance with your tallboy routes:
http.createServer(YourRouterName.route()).listen(8008), function() {
console.log('Server started on port 8008');
});