Skip to content

stowns/api-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Starter

A seed project for building out a new api. Supports resource-based routing, Sequel Models, Redis caching, TESTING, and clustering out of the box.

Getting Started

  • nvm install 0.10.26
  • npm install -g mocha grunt-cli
  • npm install
  • edit /conf/development.js && /conf/test.js database information appropriately
  • createdb api_dev ; createdb api_test
  • nvm use
  • npm test
  • npm start
  • optionally, run 'grunt watch' for JSHint results on saves

Dependencies

Signals

  • SIGINT - graceful shutdown
kill -s SIGINT (process_id)
  • SIGUSR2 - Rolling restart. Useful for reloading configuration without downtime.
kill -s SIGUSR2 (process_id)

Migrations

Api Starter uses Sequelize's built in migration support. Docs here

Running

node_modules/sequelize/bin/sequelize -m --url postgres://uname:pass@localhost:5432/api_dev

IMPORTANT do NOT use the global sequelize binary ie) sequelize -m. Use the binary installed locally to the node_modules folder.

Docs

The default grunt task generates documentation using APIDoc.

About

A seed project for creating a new api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published