a nodejs & expressjs example app
npm install
node server.js
And point your browser to http://localhost:3000
All assets are served from the public directory. There is an example javascript usage of accessing/interacting with the api definitions found therein.
Apis are defined in the routes directory.
Beer
GET /beers
GET /beers/#id
POST /beers
PUT /beers/#id
DELETE /beers/#id
example beer json format
{
id: 4,
name: 'Caldera Oatmeal Stout',
percentage: 7.2
}
GET /people
GET /people/#id
POST /people
PUT /people/#id
DELETE /people/#id
example person json format
{
id: 2,
name: 'John Doe'
}
GET /votes
GET /votes/#id
POST /votes
PUT /votes/#id
DELETE /votes/#id
example votes json format
{
id: 0,
person_id: 1,
beer_id: 1,
date: '6/28/2014'
}