add dotenv

master
adb-sh 2 years ago
parent 371a10b126
commit 090a585a92

@ -9,6 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"dotenv": "^16.0.3",
"express": "^4.18.1", "express": "^4.18.1",
"spotify-api.js": "^9.2.3" "spotify-api.js": "^9.2.3"
} }
@ -163,6 +164,14 @@
"npm": "1.2.8000 || >= 1.4.16" "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": { "node_modules/ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@ -785,6 +794,11 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" "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": { "ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",

@ -11,6 +11,7 @@
"author": "Alban David Becker", "author": "Alban David Becker",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"dotenv": "^16.0.3",
"express": "^4.18.1", "express": "^4.18.1",
"spotify-api.js": "^9.2.3" "spotify-api.js": "^9.2.3"
} }

@ -1,6 +1,11 @@
import dotenv from "dotenv";
dotenv.config();
export const store = { export const store = {
users: [], users: [],
clientID: process.env.APP_SPOTIFY_CLIENT_ID, clientID: process.env.APP_SPOTIFY_CLIENT_ID,
clientSecret: process.env.APP_SPOTIFY_CLIENT_SECRET, clientSecret: process.env.APP_SPOTIFY_CLIENT_SECRET,
redirectURL: process.env.APP_SPOTIFY_REDIRECT_URI, redirectURL: process.env.APP_SPOTIFY_REDIRECT_URI,
}; };
console.log('store:', store);

Loading…
Cancel
Save