Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arxiver/nestjs-rest-jwt

RESTful API using Nest and Swagger UI
https://github.com/arxiver/nestjs-rest-jwt

boilerplate boilerplate-node boilerplate-template javascript jwt jwt-authentication nest nestjs node nodejs postgresql rest-api restful-api starter-kit starter-template swagger swagger-ui ts typescript

Last synced: 29 days ago
JSON representation

RESTful API using Nest and Swagger UI

Awesome Lists containing this project

README

        

## Description

- Backend Framework: NodeJS
- Language: TypeScript
- Server Framework: NestJS
- Database: PostgreSQL
- Testing Framework: JestJS
- API Documentation: Swagger

- Functions documentations:
```ts
/** Does something interesting
*
* @param Place $where Where something interesting takes place
* @param integer $repeat How many times something interesting should happen
*
* @throws Some_Exception_Class If something interesting cannot happen
* @return Status
*/
```

### Context:

Development template

## Installation

```bash
$ npm install
```

### Database Setup
1. Make sure you are having postgresql installed on your machine & running server.
2. Create a database named `server_db` or any name you want (config is at `config/env/dev.env`).
3. Create a databased for testing purpose named `test_db` you can change it also from same above file.

Make sure to configure all the environment variables in `config/env/dev.env` file.

## 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

# test coverage
$ npm run test:cov
```