Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cithukyaw/nest-starter
https://github.com/cithukyaw/nest-starter
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/cithukyaw/nest-starter
- Owner: cithukyaw
- Created: 2023-01-08T16:28:32.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T16:44:42.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T17:41:28.718Z (about 2 months ago)
- Language: TypeScript
- Size: 642 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJs Tutorial Project
Learn NestJs by building a CRUD REST API with end-to-end tests using modern web development techniques. NestJs is a rapidly growing node js framework that helps build scalable and maintainable backend applications.
This project builds a bookmarks API from scratch using
- [NestJs](https://nestjs.com/)
- [Docker](https://www.docker.com/)
- [PostgresSQL](https://www.postgresql.org/)
- [PassportJs](https://www.passportjs.org/)
- [Prisma](https://www.prisma.io/)
- [PactumJs](https://github.com/pactumjs/pactum)
- [Dotenv](https://www.npmjs.com/package/dotenv-cli)Resource:
- https://www.youtube.com/watch?v=GHTA143_b-s## Installation
```bash
$ npm install
```## Setup env variables
Copy `.env.default` to `.env` and change the content to
DATABASE_URL="postgresql://postgres:postgrespw@localhost:5432/nest?schema=public"
JWT_SECRET="nest-super-secret"Copy `.env.default` to `.env.test` and change the content to
DATABASE_URL="postgresql://postgres:postgrespw@localhost:5435/nest?schema=public"
JWT_SECRET="nest-super-secret"## Database setup with docker
```bash
# development
$ npm run db:dev:restart# testing
$ npm run db:test:restart
```## Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```