Dotenv, duh

This commit is contained in:
Christopher Cookman 2024-08-05 14:22:00 -06:00
parent 40ffd6492d
commit ebb05c943a
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42
3 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,4 @@
require("dotenv").config();
const express = require('express');
const app = express();
const sqlite3 = require('sqlite3').verbose();
@ -97,9 +98,6 @@ app.post('/shorten', (req, res) => { // Shorten URL
});
port = process.env.SERVER_PORT || 3000;
require("dotenv").config();
passcode = process.env.API_KEY;
app.listen(port, () => {

12
package-lock.json generated
View file

@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "GPL-3.0-or-later",
"dependencies": {
"dotenv": "^16.4.5",
"express": "^4.19.2",
"sqlite3": "^5.1.7"
}
@ -465,6 +466,17 @@
"node": ">=8"
}
},
"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/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",

View file

@ -9,6 +9,7 @@
"author": "",
"license": "GPL-3.0-or-later",
"dependencies": {
"dotenv": "^16.4.5",
"express": "^4.19.2",
"sqlite3": "^5.1.7"
}