Move onClick handlers to separate functions and add PORT env variable for backend
This commit is contained in:
@@ -14,5 +14,4 @@ export const OPENAI_API_KEY= process.env["OPENAI_API_KEY"] || "";
|
||||
export const OPENAI_MODEL = process.env["OPENAI_MODEL"] || "gpt-4o";
|
||||
export const OLLAMA_URL= process.env["OLLAMA_URL"] || "http://localhost:11434";
|
||||
export const OLLAMA_MODEL= process.env["OLLAMA_MODEL"] || "moondream";
|
||||
|
||||
// list all files in /usr/src/app/data/
|
||||
export const PORT = parseInt(process.env["PORT"]!) || 3000;
|
@@ -24,6 +24,6 @@ wss.on('connection', (ws: WebSocket) => {
|
||||
});
|
||||
});
|
||||
|
||||
server.listen(3000, () => {
|
||||
logger.info(`Server is running on http://localhost:${3000}`);
|
||||
server.listen(PORT, () => {
|
||||
logger.info(`Server is running on http://localhost:${PORT}`);
|
||||
});
|
Reference in New Issue
Block a user