Task: Updated lerna.json and add yarn workspaces and ts-common package and fixed the tsconfig
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createServer } from "http"
|
||||
import Express from "express"
|
||||
import { SERVER_PORT } from "./app.config"
|
||||
import { info } from "@cubetiq/ts-common/dist/log"
|
||||
|
||||
// get current host id
|
||||
const hostId = `${require("os").hostname()}#${process.pid}`
|
||||
@@ -9,12 +10,11 @@ const startedAt = new Date()
|
||||
const app = Express()
|
||||
const httpServer = createServer(app)
|
||||
|
||||
console.log(
|
||||
info(
|
||||
`Application server running on: ${hostId} at port: ${SERVER_PORT} and started at: ${startedAt}`
|
||||
)
|
||||
httpServer.listen(SERVER_PORT)
|
||||
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.type("json")
|
||||
res.send({
|
||||
@@ -22,4 +22,4 @@ app.get("/", (req, res) => {
|
||||
message: `Instance id: ${hostId}`,
|
||||
status: "OK",
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user