Skip to content

Instantly share code, notes, and snippets.

@hoguej
Created March 23, 2019 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoguej/8b85b5f292409582c41b72ebc896e6a9 to your computer and use it in GitHub Desktop.
Save hoguej/8b85b5f292409582c41b72ebc896e6a9 to your computer and use it in GitHub Desktop.
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