diff --git a/.env.prod b/.env.prod deleted file mode 100644 index e4ea1d2..0000000 --- a/.env.prod +++ /dev/null @@ -1,7 +0,0 @@ -NODE_ENV=prod -DB_HOST=localhost -DB_PORT=5432 -DB_USER=your_db_user -DB_NAME=your_db_name -DB_PASSWORD=your_db_password -JWT_SECRET_KEY=your_secret_key \ No newline at end of file diff --git a/.env.test b/.env.test deleted file mode 100644 index d42db9e..0000000 --- a/.env.test +++ /dev/null @@ -1,7 +0,0 @@ -NODE_ENV=test -DB_HOST=localhost -DB_PORT=5432 -DB_USER=your_db_user -DB_NAME=your_db_name -DB_PASSWORD=your_db_password -JWT_SECRET_KEY=your_secret_key \ No newline at end of file diff --git a/.gitignore b/.gitignore index bc435e4..4781473 100644 --- a/.gitignore +++ b/.gitignore @@ -74,7 +74,6 @@ web_modules/ # dotenv environment variable files .env -.env.dev .env.development.local .env.test.local .env.production.local diff --git a/index.js b/index.js index 1c367ef..01f3874 100644 --- a/index.js +++ b/index.js @@ -13,9 +13,7 @@ const { swaggerUi, swaggerSpec } = require('./config/swagger'); // Import Swagge const metricsRoutes = require('./routes/metricsRoutes'); const { trackRequests } = require('./controllers/metricsController'); -dotenv.config({ - path: `.env.${process.env.NODE_ENV || 'dev'}`, -}); +dotenv.config(); const app = express(); const port = process.env.PORT || 3000; diff --git a/package-lock.json b/package-lock.json index 7fa20eb..276741a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6532,6 +6532,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT", + "peer": true + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index 6718fb6..d8c4e99 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ ] }, "scripts": { - "test": "NODE_ENV=prod DEBUG=module:* nyc mocha --require @babel/register", - "start": "NODE_ENV=prod node index.js", - "start:dev": "node index.js" + "test": "DEBUG=module:* nyc mocha --require @babel/register", + "start": "node src/index.js", + "dev": "nodemon src/index.js" } }