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';