refactor(builds): refactored how the builds works to include the build number now
this will be for the new lst - ccc
This commit is contained in:
@@ -9,6 +9,7 @@ import { routeHitMiddleware } from "./middleware/routeHit.middleware.js";
|
||||
import { setupRoutes } from "./routeHandler.routes.js";
|
||||
import { auth } from "./utils/auth.utils.js";
|
||||
import { lstCors } from "./utils/cors.utils.js";
|
||||
import { getAppVersion } from "./utils/version.utils.js";
|
||||
|
||||
const createApp = async () => {
|
||||
const log = createLogger({ module: "system", subModule: "main start" });
|
||||
@@ -35,6 +36,7 @@ const createApp = async () => {
|
||||
app.all(`${baseUrl}/api/auth/*splat`, toNodeHandler(auth));
|
||||
app.use(express.json());
|
||||
|
||||
const version = await getAppVersion();
|
||||
app.get(`${baseUrl}/api/lst-config.js`, (_, res) => {
|
||||
res.type("application/javascript");
|
||||
res.setHeader("Cache-Control", "no-store");
|
||||
@@ -47,7 +49,9 @@ const createApp = async () => {
|
||||
appVersion: ${JSON.stringify(umamiConfig.appVersion ?? "dev")},
|
||||
umamiHost: ${JSON.stringify(umamiConfig.umamiHost ?? "")},
|
||||
umamiWebsiteId: ${JSON.stringify(umamiConfig.umamiWebsiteId ?? "")},
|
||||
timezone: ${JSON.stringify(process.env.TIMEZONE ?? "America/Chicago")}
|
||||
timezone: ${JSON.stringify(process.env.TIMEZONE ?? "America/Chicago")},
|
||||
version: ${JSON.stringify(version.version)},
|
||||
lastBuildTIme: ${JSON.stringify(version.lastBuildTime)}
|
||||
};
|
||||
`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user