You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could add your local environment to your start script, just so that it does't throw an error if someone tries to run the server locally without running nodemon
Also, I believe you don't need three links here, unless I'm missing something:
let DB_URL = process.env.SKILLSHARE_DB_URL;
if (process.env.NODE_ENV === "test") {
DB_URL = process.env.TEST_DB_URL;
} else if (process.env.NODE_ENV === "local") {
DB_URL = process.env.LOCAL_DB_URL;
}
So I think you can only have the condition that tests if you are in the test environment or in your local environment:
let DB_URL = process.env.YOUR_LOCAL_DB_URL;
if (process.env.NODE_ENV === "test") {
DB_URL = process.env.TEST_DB_URL;
}
Your heroku db link will only be used to build the database but then you will work on your local database while in development environment
The text was updated successfully, but these errors were encountered:
You could add your local environment to your start script, just so that it does't throw an error if someone tries to run the server locally without running nodemon
Also, I believe you don't need three links here, unless I'm missing something:
So I think you can only have the condition that tests if you are in the test environment or in your local environment:
Your heroku db link will only be used to build the database but then you will work on your local database while in development environment
The text was updated successfully, but these errors were encountered: