Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Jan 14, 2017
1 parent db82014 commit 2a8ef68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ var server = http.createServer(app)

unlimited()

// Templating
// Trust "X-Forwarded-For" and "X-Forwarded-Proto" nginx headers
app.enable('trust proxy')

// Disable "powered by express" header
app.set('x-powered-by', false)

// Use pug for templates
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'pug')
app.set('x-powered-by', false)
app.engine('pug', pug.renderFile)

// Pretty print JSON
app.set('json spaces', 2)

// Use GZIP
app.use(compress())

app.use(function (req, res, next) {
Expand Down

0 comments on commit 2a8ef68

Please sign in to comment.