Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio authored Mar 21, 2019
1 parent 26b5839 commit 74ffd0e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,22 @@ new OpenApiMiddleware({
}).install(app);

app.get('/v1/pets', function(req, res, next) {
console.log('at /v1/pets here');
res.json({
test: 'hi',
});
res.json([
{ id: 1, name: 'max' },
{ id: 2, name: 'mini' },
]);
});

app.post('/v1/pets', function(req, res, next) {
res.json({
test: 'hi',
});
});

app.get('/v1/vets/:id', function(req, res, next) {
console.log('---- get /pets/:id', req.params);
// here
res.json({
id: req.params.id,
name: 'sparky',
});
});

app.get('/v1/pets/:id', function(req, res, next) {
console.log('---- get /pets/:id', req.params);
// here
res.json({
id: req.params.id,
name: 'sparky'
});
});

Expand Down

0 comments on commit 74ffd0e

Please sign in to comment.