* Install throng for easy cluster management
* Extract the Express app construction into its own file
* Switch server.js to use app clustering for deployed environments
* Worker count is based on the lesser of process.env.WEB_CONCURRENCY and the count of CPUs
* Reading clustered output is difficult, let's prefix the std{out,err} streams
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
6 lines
109 B
JavaScript
6 lines
109 B
JavaScript
const express = require('express')
|
|
|
|
const app = express()
|
|
require('../middleware')(app)
|
|
module.exports = app
|