https://github.com/ngodingbang/rwid-nestjs
Learn NestJS from basic.
https://github.com/ngodingbang/rwid-nestjs
Last synced: 10 months ago
JSON representation
Learn NestJS from basic.
- Host: GitHub
- URL: https://github.com/ngodingbang/rwid-nestjs
- Owner: ngodingbang
- License: mit
- Created: 2025-05-14T14:09:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-02T14:26:01.000Z (about 1 year ago)
- Last Synced: 2025-06-17T06:36:34.379Z (about 1 year ago)
- Language: TypeScript
- Size: 419 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# RWID NestJS
[](LICENSE.md)
[](https://github.com/ngodingbang/rwid-nestjs/releases)
[](https://github.com/ngodingbang/rwid-nestjs/actions/workflows/main.yml)
[](https://codecov.io/gh/ngodingbang/rwid-nestjs)
## Table of contents
- [RWID NestJS](#rwid-nestjs)
- [Table of contents](#table-of-contents)
- [Description](#description)
- [Requirements](#requirements)
- [Project setup](#project-setup)
- [Compile and run the project](#compile-and-run-the-project)
- [Database](#database)
- [Initial setup](#initial-setup)
- [Migrations](#migrations)
- [Run tests](#run-tests)
- [Stay in touch](#stay-in-touch)
- [API documentation](#api-documentation)
- [Changelog](#changelog)
- [License](#license)
## Description
Learn [NestJS](https://nestjs.com) from basic.
## Requirements
- [](https://nodejs.org)
- [](https://pnpm.io)
- [](https://www.postgresql.org)
## Project setup
```bash
$ cp .env.example .env # Copy .env.example to .env
$ pnpm install
```
## Compile and run the project
```bash
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run build # Build the project (skip this if `/dist` folder is already exists)
$ pnpm run start:prod
```
Open your browser and navigate to [localhost:3000](http://localhost:3000).
## Database
### Initial setup
```bash
# create database and run migrations
$ pnpm exec prisma migrate dev
# run seed
$ pnpm exec prisma db seed
```
Make sure you have the PostgreSQL environment and already setup these .env configurations below before running the commands above.
```properties
DB_URL=postgresql://root:password@localhost:5432/rwid_nestjs?schema=public
```
This project is using [Prisma](https://prisma.io) as the database tool. Please read their documentation for more information.
### Migrations
Run this command below to generate a new migration file.
```bash
$ pnpm run migration:dev
```
All migrations are stored in `src/prisma/migrations` directory. The migrations directory has the following structure:
```bash
src/
└── prisma/
└── migrations/
└── 20250526155757_0_2_0
└── migration.sql
└── migration_lock.toml
```
## Run tests
```bash
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
```
## Stay in touch
- Author - [NgodingBang](https://threads.net/@ngodingbang)
- Website - [https://ngodingbang.my.id](https://ngodingbang.my.id)
## API documentation
You can access the API documentation here:
- Development - [localhost:3000/api/docs](http://localhost:3000/api/docs).
- Staging - TBD.
- Production - TBD.
## Changelog
You can read the changelog [here](CHANGELOG.md).
## License
You can read the license [here](LICENSE.md).