Make sure you have Docker installed
To install the database management, run:
docker-compose up -d
To create database, run:
docker exec -it todo psql -U postgres -c "create database todo"
.env file
- Create the
.env
file - Copy and parse the connection information below:
DB_USER=postgres
DB_HOST=localhost
DB_DATABASE=todo
DB_PORT=54320
Open and run the database/sql/database.sql
by postgres tools (i.e. pgAdmin)
dump data
To initialize the dump data for todo
database, run:
npm run seed
To run development environment
npm run dev
To run production environment
npm start