Last active
October 11, 2015 23:03
-
-
Save jdx/a1105ca8c483c836e51e to your computer and use it in GitHub Desktop.
express example
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
app.get('/user/:id', function (req, res) { | |
db.get(req.params.userId, function (err, user) { | |
if (err) throw err; | |
res.json(user); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment