diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 22:39:11 +0000 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-03-07 22:39:11 +0000 |
| commit | 296cb7cc2b1c06282e5c03a92ec7ba46b25cb288 (patch) | |
| tree | f87f44e5797b508280208ccb2274bf1a0aed1dc6 | |
| parent | dc965e47ad8c256bed3776ea0ab4e3c6ec7ad263 (diff) | |
Loads .env
| -rw-r--r-- | package-lock.json | 12 | ||||
| -rw-r--r-- | package.json | 1 | ||||
| -rw-r--r-- | src/app.js | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/package-lock.json b/package-lock.json index 8dd377b..bbdb66e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "dependencies": { "body-parser": "^1.20.2", + "dotenv": "^16.4.5", "express": "^4.18.3", "fs": "^0.0.1-security", "twilio": "^4.23.0" @@ -385,6 +386,17 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", diff --git a/package.json b/package.json index 5df1265..a6ef593 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ }, "dependencies": { "body-parser": "^1.20.2", + "dotenv": "^16.4.5", "express": "^4.18.3", "fs": "^0.0.1-security", "twilio": "^4.23.0" @@ -1,9 +1,11 @@ const bodyParser = require('body-parser'); +const dotenv = require('dotenv'); const express = require('express'); const { isSubscribed, getSubscriptions, getSubscriptionFromNumber, subscribe, load: loadData } = require('./db'); const { sendTextMessage } = require('./sendTextMessage'); const { MessagingResponse } = require('twilio').twiml; +dotenv.config(); loadData(); const app = express(); |
