Skip to content

local database doesn't work #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
m4v15 opened this issue Mar 31, 2019 · 0 comments
Open

local database doesn't work #63

m4v15 opened this issue Mar 31, 2019 · 0 comments

Comments

@m4v15
Copy link

m4v15 commented Mar 31, 2019

This isn't a big deal, but something that might be useful to know:

This line, in sequilize.js which you need to make the remote DB work, stops a local DB from working:

  dialectOptions: {
    ssl: true,
  },

There are a few ways around it, a simple one is having it depend on an environment variable, eg:

dialectOptions: {
  ssl: !process.env.USE_LOCAL_DB,
},

Then if someone wants to use a local database, they just make sure they have a variable called USE_LOCAL_DB in their env file. On Heroku, or wherever you want to use a hosted DB, this variable should not exist so then the statement ssl: !process.env.USE_LOCAL_DB evaluates to ssl:true as it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant