InquisitiveTom
InquisitiveTom

Reputation: 483

Postgres: What is the development process?

What is the normal process for working with Postgres in a Node, React, Express application?

In that past, I've used MongoDB Atlas to quickly create and host a database for my development environment. My current project is using Postgres for the database, however, I'm trying to figure out the process/workflow.

For example, trying to find a Postgres as a service equivalent to Atlas, Heroku and Digital Ocean seem to match that bill. However, it looks like Heroku needs a deployed project to work. I don't want to deploy yet and really just want a development database.

Is it normal practice for everyone on the project to spin up a local Postgres database and then deploy/host a single production database at the end? Thanks for the help!

Upvotes: 0

Views: 180

Answers (1)

shonster88
shonster88

Reputation: 84

I would suggest following workflow that I've recently used on a project.

  • local instances on docker or something (feature development purposes)
  • first staging instance that could be used as stable dev env (can be used for specific feature testing, or as a internal testing environment)
  • second staging instance where stable master branch with hashed prod data can be used for external testing
  • prod or prod mirror, depends on project requirements

It would be also helpful to have migrations within the code, so that you can keep track of DB development as well. Also look into https://sequelize.org/ as it could be helpful.

Upvotes: 1

Related Questions