Database: Postgres

Configure the Postgres database

Create Databases

Create the necessary databases for your development and deployment workflow for example:

  1. nesula_dev for development

  2. nesula_stage for staging & test environment

  3. nesula_prod for production environment

Nesula has no technical issues with using the same database for development, staging & production. Using This a single database for all environments is not recommended for live applications.

.Env

After you have created a database it must be added to the .env files for the environments you intend to use:

/nest-api/.env.dev
# ----- POSTGRES -----
NES_POSTGRES_HOST = "localhost"
NES_POSTGRES_PORT = 5432
NES_POSTGRES_USERNAME = "postgres"
NES_POSTGRES_PASSWORD = "your-database-password"
NES_POSTGRES_DATABASE = "nesula_dev"

Tooling

Command Line

A Postgres database may be created via the command line. However it can be problematic for the inexperienced. If your not already familiar with Postgres at the command line we recommend using a database client.

Database Client

When developing with Nesula it is handy to have a desktop database client. There are several good third-party products available:

Last updated

Was this helpful?