Created
March 23, 2019 20:56
-
-
Save hoguej/8b85b5f292409582c41b72ebc896e6a9 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
app.get(function(req, res) => { | |
post.findById(req.params.postId) { | |
res.json(post); | |
} | |
}); | |
app.get( "/posts/:postId", ( req: any, res ) => { | |
post.findById(req.params.postId) { | |
res.json(post); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment