refactor(datamart): more work on getting this to be a more dynamic/sync system
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createServer } from "node:http";
|
||||
import os from "node:os";
|
||||
import createApp from "./app.js";
|
||||
import { startDatamartSync } from "./src/datamart/datamartSync.controller.js";
|
||||
import { createLogger } from "./src/logger/logger.controller.js";
|
||||
import { connectProdSql } from "./src/prodSql/prodSqlConnection.controller.js";
|
||||
import { setupSocketIORoutes } from "./src/socket.io/serverSetup.js";
|
||||
@@ -10,7 +11,9 @@ const port = Number(process.env.PORT) || 3000;
|
||||
const start = async () => {
|
||||
const log = createLogger({ module: "system", subModule: "main start" });
|
||||
|
||||
// triggering long lived processes
|
||||
connectProdSql();
|
||||
startDatamartSync();
|
||||
|
||||
const { app, baseUrl } = await createApp();
|
||||
|
||||
@@ -20,7 +23,7 @@ const start = async () => {
|
||||
|
||||
server.listen(port, async () => {
|
||||
log.info(
|
||||
`Listening on http://${os.hostname()}:${port}${baseUrl}, logging in ${process.env.LOG_LEVEL}`,
|
||||
`Listening on http://${os.hostname()}:${port}${baseUrl}, logging in ${process.env.LOG_LEVEL}, current ENV ${process.env.NODE_ENV ? process.env.NODE_ENV : "development"}`,
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user