From b201a6116400e75fb920206a710f21573bf1fed1 Mon Sep 17 00:00:00 2001 From: "kam (from the studio)" Date: Tue, 17 Jan 2023 12:58:06 +0100 Subject: [PATCH] dotenv --- package-lock.json | 14 ++++++++++++++ package.json | 1 + server.js | 3 +++ 3 files changed, 18 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8a2a280..755f356 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "dotenv": "^16.0.3", "express": "^4.18.2", "ws": "^8.11.0" } @@ -130,6 +131,14 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -699,6 +708,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", diff --git a/package.json b/package.json index 506105c..1d672d3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "author": "", "license": "ISC", "dependencies": { + "dotenv": "^16.0.3", "express": "^4.18.2", "ws": "^8.11.0" } diff --git a/server.js b/server.js index 53f8476..06c9ce6 100644 --- a/server.js +++ b/server.js @@ -1,4 +1,7 @@ const { WebSocket, WebSocketServer } = require("ws"); +const dotenv = require("dotenv"); +dotenv.config(); + const express = require("express"); const PORT = process.env.PORT || 3000;