generator-restify

0.2.0 • Public • Published

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

Package Sidebar

Install

npm i generator-restify

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • chris-l