feat: add dotenv

This commit is contained in:
Kris Koishigawa 2020-09-14 18:03:06 +09:00
parent a0556d30ee
commit 8a439ad027
3 changed files with 11 additions and 4 deletions

7
package-lock.json generated
View File

@ -119,6 +119,11 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@ -282,7 +287,7 @@
"mongodb": {
"version": "3.5.9",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz",
"integrity": "sha1-eZtyvoEQt+caiCu3zg2E0FQp93I=",
"integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==",
"requires": {
"bl": "^2.2.0",
"bson": "^1.1.4",

View File

@ -7,11 +7,12 @@
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"mongodb": "^3.5.9",
"mongoose": "^5.9.27",
"cors": "^2.8.5",
"body-parser": "^1.19.0"
"mongoose": "^5.9.27"
},
"engines": {
"node": "12.18.3"

View File

@ -1,3 +1,4 @@
require('dotenv').config();
const express = require('express');
const mongo = require('mongodb');
const mongoose = require('mongoose');