diff --git a/src/server.ts b/src/server.ts index 02bf86c..123b196 100644 --- a/src/server.ts +++ b/src/server.ts @@ -4,12 +4,13 @@ import { SERVER_PORT } from "./app.config" // get current host id const hostId = `${require("os").hostname()}#${process.pid}` +const startedAt = new Date() const app = Express() const httpServer = createServer(app) console.log( - `Application server running on: ${hostId} at port: ${SERVER_PORT} and started at: ${Date()}` + `Application server running on: ${hostId} at port: ${SERVER_PORT} and started at: ${startedAt}` ) httpServer.listen(SERVER_PORT) @@ -17,6 +18,7 @@ httpServer.listen(SERVER_PORT) app.get("/", (req, res) => { res.type("json") res.send({ + startedAt, message: `Instance id: ${hostId}`, status: "OK", })