Add Cache-Tag headers

This commit is contained in:
MICHAEL JACKSON
2017-08-12 17:23:40 -07:00
parent 5f2805c2e9
commit db69375e9c
8 changed files with 66 additions and 95 deletions

View File

@ -1,12 +1,16 @@
const path = require('path')
const throng = require('throng')
const { startServer } = require('./server/index')
const createServer = require('./server/createServer')
const port = parseInt(process.env.PORT, 10) || 5000
const publicDir = path.resolve(__dirname, 'build')
throng({
workers: process.env.WEB_CONCURRENCY || 1,
start: (id) => startServer({ id, port, publicDir }),
lifetime: Infinity
lifetime: Infinity,
start: function (id) {
const server = createServer()
server.listen(port, function () {
console.log('Server #%s listening on port %s, Ctrl+C to stop', id, port)
})
}
})