feat: Web concurrency (#2347)

* feat: Fork multiple processes

* Remove boxen

* comment

* chore: Add support for Heroku DATABASE_CONNECTION_POOL_URL
closes #2306
This commit is contained in:
Tom Moor
2021-07-26 18:51:50 -04:00
committed by GitHub
parent c9bd3bbf45
commit 8ee018a759
6 changed files with 46 additions and 71 deletions

View File

@ -234,10 +234,12 @@ server.on("listening", () => {
console.log(`\n> Listening on http://localhost:${address.port}\n`);
});
(async () => {
export async function start(id: string) {
console.log(`Started worker ${id}`);
await checkMigrations();
server.listen(process.env.PORT || "3000");
})();
}
export const socketio = io;