mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-06 01:39:38 -06:00
add env vars
This commit is contained in:
@@ -4,8 +4,9 @@ services:
|
||||
restart: always
|
||||
ports:
|
||||
- "52345:52345"
|
||||
env_file:
|
||||
- server.env
|
||||
environment:
|
||||
- UPTIME_APP_API_BASE_URL=http://localhost:52345/api/v1
|
||||
- UPTIME_APP_CLIENT_HOST=http://localhost
|
||||
depends_on:
|
||||
- redis
|
||||
- mongodb
|
||||
|
||||
@@ -99,6 +99,8 @@ const openApiSpec = JSON.parse(
|
||||
fs.readFileSync(path.join(__dirname, "openapi.json"), "utf8")
|
||||
);
|
||||
|
||||
const frontendPath = path.join(__dirname, "public");
|
||||
|
||||
let server;
|
||||
|
||||
const shutdown = async () => {
|
||||
@@ -308,6 +310,7 @@ const startApp = async () => {
|
||||
const notificationRoutes = new NotificationRoutes(notificationController);
|
||||
const diagnosticRoutes = new DiagnosticRoutes(diagnosticController);
|
||||
// Middleware
|
||||
app.use(express.static(frontendPath));
|
||||
app.use(responseHandler);
|
||||
app.use(
|
||||
cors({
|
||||
@@ -353,6 +356,10 @@ const startApp = async () => {
|
||||
status: "OK",
|
||||
});
|
||||
});
|
||||
// FE routes
|
||||
app.get("*", (req, res) => {
|
||||
res.sendFile(path.join(frontendPath, "index.html"));
|
||||
});
|
||||
app.use(handleErrors);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user