Intento de utilizar nodemon development para desarrollar son estropear production.

This commit is contained in:
2025-08-16 02:18:50 +00:00
parent 1db2f11c19
commit f9bf5f4824
9 changed files with 212 additions and 20 deletions
+3 -2
View File
@@ -5,13 +5,14 @@ FROM node:20.17
ARG NODE_ENV=development
ARG PORT=4000
RUN apt-get update
RUN apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Copia archivos de configuración primero para aprovechar el cache
COPY package*.json ./
# Instala dependencias
RUN apt-get update
RUN npm i
RUN apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Copia el resto de la app
COPY . .
+13
View File
@@ -0,0 +1,13 @@
{
"watch": ["src"],
"ext": "js,json",
"ignore": [
"node_modules/**/node_modules",
"node_modules/",
".git"
],
"env": {
"NODE_ENV": "development"
},
"exec": "node ./src/index.js"
}
+4 -4
View File
@@ -4,7 +4,7 @@
"main": "index.js",
"scripts": {
"start": "NODE_ENV=production node ./src/index.js",
"dev": "NODE_ENV=development node ./src/index.js",
"dev": "npx nodemon",
"test": "NODE_ENV=stage node ./src/index.js"
},
"author": "Mateo Saldain",
@@ -15,14 +15,14 @@
"nodemon": "^3.1.10"
},
"dependencies": {
"bcrypt": "^5.1.1",
"chalk": "^5.3.0",
"cors": "^2.8.5",
"dotenv": "^17.2.1",
"express": "^5.1.0",
"express-ejs-layouts": "^2.5.1",
"pg": "^8.16.3",
"bcrypt": "^5.1.1",
"chalk": "^5.3.0",
"pg-format": "^1.0.4"
"pg-format": "^1.0.4"
},
"keywords": [],
"description": ""