Skip to content

chris-l/generator-restify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generator-restify Build Status

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-app

Run the generator:

yo restify

License

MIT

About

Create a restify based RESTful API, with a linter (jshint or jslint)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •