Nest framework TypeScript starter repository.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
npm i
sudo -i -u postgres
createdb nestjs_example_${env}
npm run db:migration:create -- ${migration_name}
NODE_ENV=${env} npm run db:migration:run
| Note: you need to specify env
only for development
NODE_ENV=${env} npm run db:schema:sync
| Note: you need to specify env
only for development
npm run start:dev
npm run build
npm run start:beta
npm run build
npm run start:prod
docker network create nestjs_example_network
"DB_SETTINGS": {
"host": "db", // service name from docker-compose.yml
"port": 5432, // service port from docker-compose.yml
...
},
...
"REDIS_SETTINGS": {
"host": "redis", // service name from docker-compose.yml
"port": 6379, // service port from docker-compose.yml
...
},
docker-compose -f docker-compose.yml up --build
docker-compose -f docker-compose.yml exec db sh
createdb nestjs_example_$ENV -U postgres
docker-compose -f docker-compose.yml exec beta-web sh
npm run db:schema:sync
docker-compose -f docker-compose.yml up