Skip to content

Commit

Permalink
Makes all form submitted fields accessible on req.body
Browse files Browse the repository at this point in the history
  • Loading branch information
fidanov committed Apr 20, 2015
1 parent dc1bdf9 commit 0583778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.js
@@ -1,13 +1,15 @@
var express = require('express')
, app = express()
, bodyParser = require('body-parser')
, port = process.env.PORT || 3000

app.set('views', __dirname + '/views')
app.engine('jade', require('jade').__express)
app.set('view engine', 'jade')

app.use(express.static(__dirname + '/public'))
app.use(require('body-parser').json())
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: true}))
app.use(require('./controllers'))

app.listen(port, function() {
Expand Down

0 comments on commit 0583778

Please sign in to comment.