fix: Server split so that server is run on EE as well (#39435)
This commit is contained in:
parent
9fbf6c3b2c
commit
c2bef377ab
|
|
@ -2,7 +2,6 @@ import http from "http";
|
|||
import express from "express";
|
||||
import type { LogLevelDesc } from "loglevel";
|
||||
import log from "loglevel";
|
||||
import { VERSION as buildVersion } from "../version"; // release version of the api
|
||||
|
||||
// routes
|
||||
import ast_routes from "../routes/ast_routes";
|
||||
|
|
@ -17,10 +16,8 @@ const logLevel: LogLevelDesc = (process.env.APPSMITH_LOG_LEVEL ||
|
|||
|
||||
log.setLevel(logLevel);
|
||||
|
||||
const APPSMITH_RTS_PORT = process.env.APPSMITH_RTS_PORT || 8091;
|
||||
|
||||
//Disable x-powered-by header to prevent information disclosure
|
||||
const app = express();
|
||||
export const app = express();
|
||||
|
||||
app.disable("x-powered-by");
|
||||
const server = new http.Server(app);
|
||||
|
|
@ -34,11 +31,5 @@ app.use(`${RTS_BASE_API_PATH}`, health_check_routes);
|
|||
|
||||
server.headersTimeout = 61000;
|
||||
server.keepAliveTimeout = 60000;
|
||||
// Run the server
|
||||
server.listen(APPSMITH_RTS_PORT, () => {
|
||||
log.info(
|
||||
`RTS version ${buildVersion} running at http://localhost:${APPSMITH_RTS_PORT}`,
|
||||
);
|
||||
});
|
||||
|
||||
export default server;
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
import "../ce/server.ts";
|
||||
import server from "../ce/server";
|
||||
|
||||
export default server;
|
||||
|
|
|
|||
|
|
@ -1 +1,11 @@
|
|||
import "./ee/server.ts";
|
||||
import server from "./ee/server";
|
||||
import log from "loglevel";
|
||||
import { VERSION as buildVersion } from "./version"; // release version of the api
|
||||
|
||||
const APPSMITH_RTS_PORT = process.env.APPSMITH_RTS_PORT || 8091;
|
||||
|
||||
server.listen(APPSMITH_RTS_PORT, () => {
|
||||
log.info(
|
||||
`RTS version ${buildVersion} running at http://localhost:${APPSMITH_RTS_PORT}`,
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user