Added .env file support more directly

This commit is contained in:
2024-03-23 00:14:31 -05:00
parent 6dddc5799f
commit 0648dcb96c
5 changed files with 41 additions and 2 deletions

1
api/.gitignore vendored
View File

@@ -1 +0,0 @@
.env

View File

@@ -17,4 +17,17 @@ app.use("/api/data", dataRoutes);
app.use("/api/inventory", inventoryRoutes);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));
app.listen(PORT, () => {
console.log(`Environment: \n\n
${JSON.stringify(process.env)}`);
console.log(`Server running on port ${PORT}`); //These will both get updated to smartLogging later
console.log(`System Settings: \n
port = ${process.env.PORT} \n
debug = ${process.env.DEBUG} \n
dotenv_key = ${process.env.DOTENV_KEY} \n
ebay_client_id = ${process.env.EBAY_CLIENT_ID} \n
ebay_client_secret = ${process.env.EBAY_CLIENT_SECRET} \n
ebay_dev_id = ${process.env.EBAY_DEV_ID} \n
ebay_redirect_uri = ${process.env.EBAY_REDIRECT_URI} \n
`);
});