From aaa6a585cf3506989eb1198dfc4be7a655dc7ee9 Mon Sep 17 00:00:00 2001 From: Ken Ahrens Date: Thu, 11 Apr 2024 16:43:43 -0400 Subject: [PATCH] fix start --- api/Dockerfile | 2 +- api/package.json | 3 ++- api/src/server.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index cc728f7..a431749 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -16,4 +16,4 @@ RUN npm install EXPOSE 8080 -CMD ["npm", "start"] +CMD ["npm", "run", "start-prod"] diff --git a/api/package.json b/api/package.json index ee5ac29..4dccf64 100644 --- a/api/package.json +++ b/api/package.json @@ -4,7 +4,8 @@ "description": "middleware to call ai model", "main": "server.js", "scripts": { - "start": "nodemon server.js", + "start": "nodemon src/server.js", + "start-prod": "node src/server.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/api/src/server.js b/api/src/server.js index 0a77bfe..be0dbb3 100644 --- a/api/src/server.js +++ b/api/src/server.js @@ -1,4 +1,4 @@ -import 'global-agent/bootstrap'; +import 'global-agent/bootstrap.js'; import 'dotenv/config'; import app from './app.js'; // Note the '.js' extension import { initializeDb } from './db/database.js';