You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How adjust this error?
my package.json is he
"scripts": {
"dev": "docker-compose up -d && nodemon",
"unit-test": "jest --runInBand --coverage --verbose -c jest.unit.config.js",
"migrate": "node-pg-migrate"
},
my .env is he
ENV=dev
EXPRESS_PORT = 3333
SECRET=SECRET
API_URL=http://localhost:3333/
POSTGRES_DATABASE=Carrarapets_dbo
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
The text was updated successfully, but these errors were encountered:
The easiest way to solve this problem is to specify your database url by setting the environment variable DATABASE_URL:
DATABASE_URL=postgres://username:password@hostname:5432/db_name
Seconfd way is to install config: npm i config
Then you should create folder 'config' in the root directory, in this folder create file default.json wjth your database connection information:
You need to install dotenv. They didn't mention dotenv as a peer dependency in their package.json so it's not loading the environment variables before running commands.
How adjust this error?
my package.json is he
"scripts": {
"dev": "docker-compose up -d && nodemon",
"unit-test": "jest --runInBand --coverage --verbose -c jest.unit.config.js",
"migrate": "node-pg-migrate"
},
my .env is he
ENV=dev
EXPRESS_PORT = 3333
SECRET=SECRET
API_URL=http://localhost:3333/
POSTGRES_DATABASE=Carrarapets_dbo
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
The text was updated successfully, but these errors were encountered: