fullstack-apollo-express-postgresql-boilerplate icon indicating copy to clipboard operation
fullstack-apollo-express-postgresql-boilerplate copied to clipboard

Do not wipe database in production

Open morenoh149 opened this issue 6 years ago • 1 comments

If the DATABASE_URL env var is defined we act like we are in production. When we are in production we wipe the db if the api restarts.

  1. env var DATABASE_URL should not imply production
  2. do not wipe db if we are in production
  3. factor out the seeding step into a separate file while we are at it.

Relevant code https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate/blob/master/src/index.js#L94

morenoh149 avatar Feb 28 '19 00:02 morenoh149

Related https://github.com/the-road-to-graphql/fullstack-apollo-express-postgresql-boilerplate/pull/54

rwieruch avatar May 14 '19 09:05 rwieruch