From 8a439ad027af78254812212b2b3c44600afeaee7 Mon Sep 17 00:00:00 2001 From: Kris Koishigawa Date: Mon, 14 Sep 2020 18:03:06 +0900 Subject: [PATCH] feat: add dotenv --- package-lock.json | 7 ++++++- package.json | 7 ++++--- server.js | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c0c7c0..5e5ae96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 04161ea..13f0d1c 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/server.js b/server.js index 354e5fe..42c2daa 100644 --- a/server.js +++ b/server.js @@ -1,3 +1,4 @@ +require('dotenv').config(); const express = require('express'); const mongo = require('mongodb'); const mongoose = require('mongoose');