Skip to content

Commit

Permalink
docs: remove dead code from examples
Browse files Browse the repository at this point in the history
closes #321
closes #322
  • Loading branch information
azhao12345 authored and dougwilson committed Aug 9, 2018
1 parent c916ed8 commit c1e33a4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,11 @@ var urlencodedParser = bodyParser.urlencoded({ extended: false })

// POST /login gets urlencoded bodies
app.post('/login', urlencodedParser, function (req, res) {
if (!req.body) return res.sendStatus(400)
res.send('welcome, ' + req.body.username)
})

// POST /api/users gets JSON bodies
app.post('/api/users', jsonParser, function (req, res) {
if (!req.body) return res.sendStatus(400)
// create user in req.body
})
```
Expand Down

0 comments on commit c1e33a4

Please sign in to comment.