Rewrite frontend using create-react-app
This commit is contained in:
12
server.js
Normal file
12
server.js
Normal file
@ -0,0 +1,12 @@
|
||||
const path = require('path')
|
||||
const throng = require('throng')
|
||||
const { startServer } = require('./server/index')
|
||||
|
||||
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
|
||||
})
|
Reference in New Issue
Block a user