1.2.0 • Published 8 years ago
tallboy v1.2.0
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 tallboy
Basic 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 constructor
Instantiate 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');
});