feat(ccc): added in forwarder to the ccc, currently always sending there
This commit is contained in:
@@ -2,6 +2,7 @@ import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { toNodeHandler } from "better-auth/node";
|
||||
import express from "express";
|
||||
import { createProxyMiddleware } from "http-proxy-middleware";
|
||||
import morgan from "morgan";
|
||||
import { umamiConfig } from "./configs/umami.config.js";
|
||||
import { createLogger } from "./logger/logger.controller.js";
|
||||
@@ -58,6 +59,22 @@ const createApp = async () => {
|
||||
|
||||
setupRoutes(baseUrl, app);
|
||||
|
||||
// point to the ccc
|
||||
// TODO: gate this behind a feature switch
|
||||
app.use(
|
||||
baseUrl + "/ccc",
|
||||
createProxyMiddleware({
|
||||
target: `http://localhost:${process.env.CCC || "5000"}`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: (path, _) => {
|
||||
return path.replace(`${baseUrl}/ccc`, "");
|
||||
},
|
||||
headers: {
|
||||
"X-Forwarded-By": "express-proxy",
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
app.use(
|
||||
`${baseUrl}/app`,
|
||||
express.static(join(__dirname, "../frontend/dist")),
|
||||
|
||||
27974
package-lock.json
generated
27974
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "lst_v3",
|
||||
"version": "0.1.0-alpha.3",
|
||||
"build": "179",
|
||||
"lastBuildDate": "6/17/2026 11:03",
|
||||
"build": "181",
|
||||
"lastBuildDate": "6/22/2026 06:50",
|
||||
"description": "The tool that supports us in our everyday alplaprod",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -87,6 +87,7 @@
|
||||
"drizzle-zod": "^0.8.3",
|
||||
"excel-date-to-js": "^1.1.5",
|
||||
"express": "^5.2.1",
|
||||
"http-proxy-middleware": "^4.1.1",
|
||||
"husky": "^9.1.7",
|
||||
"ldapts": "^8.1.7",
|
||||
"modbus-serial": "^8.0.25",
|
||||
|
||||
Reference in New Issue
Block a user