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=3000
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"
}
+2
View File
@@ -241,6 +241,7 @@
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.0.0.tgz",
"integrity": "sha512-aU8qlEK/nHYtVuN4p7UQgAwVljzMg8hB4YK5ThRqD2l/ziSnryncPNn7bMLt5cFYsKVKBh8HqLqyCoTupEUu7Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@epic-web/invariant": "^1.0.0",
"cross-spawn": "^7.0.6"
@@ -751,6 +752,7 @@
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz",
"integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==",
"dev": true,
"license": "MIT",
"dependencies": {
"chokidar": "^3.5.2",
"debug": "^4",
+3 -3
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,13 +15,13 @@
"nodemon": "^3.1.10"
},
"dependencies": {
"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",
"chalk": "^5.3.0",
"pg-format": "^1.0.4"
"pg-format": "^1.0.4"
},
"keywords": [],
"description": ""
+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": ""