Skip to content

Instantly share code, notes, and snippets.

@ccoenraets
Created October 2, 2012 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ccoenraets/3815974 to your computer and use it in GitHub Desktop.
Save ccoenraets/3815974 to your computer and use it in GitHub Desktop.
{
"name": "wine-cellar",
"description": "Wine Cellar Application",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
var express = require('express');
var app = express();
app.get('/wines', function(req, res) {
res.send([{name:'wine1'}, {name:'wine2'}]);
});
app.get('/wines/:id', function(req, res) {
res.send({id:req.params.id, name: "The Name", description: "description"});
});
app.listen(3000);
console.log('Listening on port 3000...');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment