separate process from client

This commit is contained in:
2023-03-15 18:29:45 +01:00
parent 45225cc908
commit 3f0adf3789
3 changed files with 14 additions and 5 deletions
+1
View File
@@ -32,6 +32,7 @@
"build": "npx tsc",
"startServer": "node out/serverMain.js",
"startClient": "node out/clientMain.js",
"startProcess": "node out/processMain.js",
"documentation": "widdershins reference/OpenAPI.yml -o docs/openapi.md --language_tabs javascript:JavaScript:request.",
"test": "jest"
}
+2 -5
View File
@@ -5,7 +5,6 @@ import cors from 'cors'
import client from './client/client'
import { dbReady } from './db/db'
import { cacheReady } from './cache/redis'
import processAll from './client/process'
const app = express()
const port = 3000
@@ -21,10 +20,8 @@ app.use('/', client)
dbReady().then((e) => {
cacheReady().then((e) => {
processAll().then((e) => {
app.listen(port, '0.0.0.0', () => {
console.log(`Tone client api listening on port ${port}`)
})
app.listen(port, '0.0.0.0', () => {
console.log(`Tone client api listening on port ${port}`)
})
})
})
+11
View File
@@ -0,0 +1,11 @@
import * as dotenv from 'dotenv'
dotenv.config()
import { dbReady } from './db/db'
import { cacheReady } from './cache/redis'
import processAll from './client/process'
dbReady().then((e) => {
cacheReady().then((e) => {
processAll()
})
})