SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
remove admin server
Ahmed Essam2143d41660b8
diff --git a/packages/app/src/backend/adminServer.ts b/packages/app/src/backend/adminServer.tsdeleted file mode 100644index b393abb7..00000000--- a/packages/app/src/backend/adminServer.ts+++ /dev/null@@ -1,34 +0,0 @@-import express from 'express';-import { Server } from 'http';--export function createAdminServer(mainApp: Server, mainAppPort: number, adminPort: number) {- const adminApp = express();-- adminApp.get('/enable', (req, res) => {- if (!mainApp.listening) {- mainApp.listen(mainAppPort, 'localhost', () => {- console.log(`Main server re-enabled and listening on port ${mainAppPort}`);- });- res.send(`Main server enabled and listening on port ${mainAppPort}`);- } else {- res.send('Main server is already running');- }- });-- adminApp.get('/disable', (req, res) => {- if (mainApp.listening) {- mainApp.close(() => {- console.log(`Main server disabled and no longer accepting connections`);- });- res.send(`Main server disabled and no longer accepting connections`);- } else {- res.send('Main server is already stopped');- }- });-- adminApp.listen(adminPort, 'localhost', () => {- console.log(`Admin server listening on port ${adminPort}`);- });-- return adminApp;-}diff --git a/packages/app/src/backend/index.ts b/packages/app/src/backend/index.tsindex a4bc56f7..a694c824 100644--- a/packages/app/src/backend/index.ts+++ b/packages/app/src/backend/index.ts@@ -23,7 +23,6 @@ import compression from 'compression';import RedisStore from 'connect-redis';import passport from 'passport';import { version } from '../../package.json';-import { createAdminServer } from './adminServer';import { maintenanceCheckMiddleware } from './middlewares/maintainceCheck.mw';import { initializePassport } from './routes/oauth/helper/passportSetup';import { ModelsPollingService } from './services/ModelsPolling.service';@@ -31,7 +30,6 @@ import { cacheClient } from './services/cache.service';const PORT = config.env.PORT || 4000;const app = express();-const ADMIN_PORT = config.env.ADMIN_PORT || 4001;app.disable('x-powered-by');@@ -129,12 +127,10 @@ app.use('/', pagesRouter);//error handling middlewaresapp.use(errorHandler);-let server = app.listen(PORT, () => {+let server = app.listen(PORT, 'localhost', () => {console.log(`Listening on port ${PORT}`);});-createAdminServer(server, PORT, ADMIN_PORT);-process.on('uncaughtException', (err) => {console.error('An uncaught error occurred!');console.error(err.stack);