add dotenv

This commit is contained in:
Bucaille Thommy 2022-01-19 01:46:59 +01:00
parent 04e12b75a3
commit ce9f185acc
3 changed files with 25 additions and 7 deletions

30
package-lock.json generated
View File

@ -21,6 +21,7 @@
"@nestjs/swagger": "^5.1.5",
"bcrypt": "^5.0.1",
"crypto": "^1.0.1",
"dotenv": "^14.2.0",
"helmet": "^5.0.1",
"moment": "^2.29.1",
"mysql2": "^2.3.3",
@ -1404,6 +1405,14 @@
"rxjs": "^6.0.0 || ^7.2.0"
}
},
"node_modules/@nestjs/config/node_modules/dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
"engines": {
"node": ">=10"
}
},
"node_modules/@nestjs/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.2.5.tgz",
@ -3888,11 +3897,11 @@
}
},
"node_modules/dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-14.2.0.tgz",
"integrity": "sha512-05POuPJyPpO6jqzTNweQFfAyMSD4qa4lvsMOWyTRTdpHKy6nnnN+IYWaXF+lHivhBH/ufDKlR4IWCAN3oPnHuw==",
"engines": {
"node": ">=10"
"node": ">=12"
}
},
"node_modules/dotenv-expand": {
@ -10966,6 +10975,13 @@
"dotenv-expand": "5.1.0",
"lodash": "4.17.21",
"uuid": "8.3.2"
},
"dependencies": {
"dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
}
}
},
"@nestjs/core": {
@ -12896,9 +12912,9 @@
}
},
"dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-14.2.0.tgz",
"integrity": "sha512-05POuPJyPpO6jqzTNweQFfAyMSD4qa4lvsMOWyTRTdpHKy6nnnN+IYWaXF+lHivhBH/ufDKlR4IWCAN3oPnHuw=="
},
"dotenv-expand": {
"version": "5.1.0",

View File

@ -33,6 +33,7 @@
"@nestjs/swagger": "^5.1.5",
"bcrypt": "^5.0.1",
"crypto": "^1.0.1",
"dotenv": "^14.2.0",
"helmet": "^5.0.1",
"moment": "^2.29.1",
"mysql2": "^2.3.3",

View File

@ -4,6 +4,7 @@ import { ConfigService } from '@nestjs/config';
import { SwaggerModule, DocumentBuilder, SwaggerCustomOptions } from '@nestjs/swagger';
import helmet from 'helmet';
import fs from 'fs';
require('dotenv').config();
async function bootstrap() {