Created
November 7, 2011 19:54
-
-
Save KyleAMathews/1345969 to your computer and use it in GitHub Desktop.
My five line node.js/coffeescript/mongodb RESTful API
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 '/groups', (req, res) -> | |
Group = mongoose.model 'group' | |
Group.find (err, groups) -> | |
if err then console.error err | |
res.json groups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment