Skip to content

Commit

Permalink
Add support for review app to handle form input
Browse files Browse the repository at this point in the history
  • Loading branch information
NickColley committed Feb 14, 2019
1 parent 3d4e21d commit 98a2dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const nunjucks = require('nunjucks')
const util = require('util')
const fs = require('fs')
Expand Down Expand Up @@ -60,6 +61,9 @@ module.exports = (options) => {
app.use('/vendor/html5-shiv/', express.static('node_modules/html5shiv/dist/'))
app.use('/assets', express.static(path.join(configPaths.src, 'assets')))

// Turn form POSTs into data that can be used for validation.
app.use(bodyParser.urlencoded({ extended: true }))

// Handle the banner component serverside.
require('./banner.js')(app)

Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"devDependencies": {
"autoprefixer": "^9.3.1",
"body-parser": "^1.18.3",
"cheerio": "^1.0.0-rc.2",
"cookie-parser": "^1.4.4",
"cssnano": "^4.1.7",
Expand Down

0 comments on commit 98a2dfe

Please sign in to comment.