.env.local

# .env.local.development DATABASE_URL=postgresql://user:password@localhost:5432/dev_database

# .env.local.staging DATABASE_URL=postgresql://user:password@staging-host:5432/staging_database .env.local

Let's consider an example use case with Node.js and Express. Suppose you have a project that requires different database connections for development, staging, and production. You can define shared variables in a .env file: const express = require('express')

require('dotenv').config(); const express = require('express'); const app = express(); const app = express()