Created
September 2, 2013 00:08
-
-
Save richy486/6408152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
app.get('/stuff', function(req, res) { | |
res.send( | |
{ | |
"options": { | |
"something": "1234" | |
}, | |
"batman": | |
[ | |
{"value": "18934675"}, | |
{"value": "gfo4"}, | |
{"value": "vih3"} | |
] | |
} | |
); | |
}); | |
app.get('/products/: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