0.2.0 • Published 10 years ago
generator-restify v0.2.0
generator-restify 
A yeoman generator that will create the boilerplate for creating a restify based RESTful API.
It uses npm scripts as the task runner. It also allows to choose between jslint or jshint.
About the folder structure
One of the most relevant parts of this generator is the auto-inclusion of files.
To create a new route, is only necessary to create a file in the routes/ directory that looks like this:
module.exports = function (server) {
server.get('/info/:param', function (req, res, next) {
});
server.put('/info/', function (req, res, next) {
});
};Just for being in the routes directory, the file will be automatically included. Is not necessary to do any other step.
Installation
Install: npm install -g generator-restify
Create a new directory and enter inside of it:
mkdir some-app && cd some-appRun the generator:
yo restifyLicense
MIT