gszathmari / node-restify-coffee-boilerplate

API Boilerplate in Restify and CoffeeScript

Home Page:http://bit.ly/api-boilerplate-restify-coffeescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node Restify CoffeeScript Boilerplate

Boilerplate built on Node.js, Restify, CoffeeScript for building APIs

Build Status Coverage Status Dependencies

Usage

Prerequisites

Install packages as the following:

$ npm install -g coffee-script coffeelint mocha

Configuration

The global configuration file is located in ./config/global.yaml

The defaults should be sufficient in any developer environment, however you may want to change the parameters in production environments.

Environmental Variables

The current variables are also for configuration besides the global configuration file

  • PORT (optional): TCP port where the API will listen (default: 5000)

Running

The API can be started with the following:

$ npm start

Testing

Run unit and end-to-end tests with the following:

$ npm test

Misc

The boilerplate can be compiled into pure JavaScript with the following command:

$ npm run build

This will compile CoffeeScript to JavaScript into the lib/ directory

Documentation

API Blueprint

Blueprint is available on Apiary

The documentation is rendered from the apiary.apib file from this repository

Live API

This boilerplate application is running on Heroku

$ curl http://node-restify-coffee.gaborszathmari.me

{"message":"Hello World!"}

Contribute

Pull requests are welcome

Check CONTRIBUTE.md for more details

Contributors

Credits

This project was inspired by the following boilerplates:

The project was first featured on the Rainbow and Unicorn security blog

License

See the LICENSE file for license rights and limitations (MIT)

About

API Boilerplate in Restify and CoffeeScript

http://bit.ly/api-boilerplate-restify-coffeescript

License:MIT License


Languages

Language:CoffeeScript 88.0%Language:API Blueprint 12.0%