Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/naveteam/back-boilerplate-nestjs


https://github.com/naveteam/back-boilerplate-nestjs

Last synced: about 14 hours ago
JSON representation

Awesome Lists containing this project

README

        

# API Boilerplate Nestjs


Nest Logo

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

A progressive Node.js framework for building efficient and scalable server-side applications.



NPM Version
Package License
NPM Downloads
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective

Support us


## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Installation

1. Install [Node.JS](https://nodejs.org/en/) LTS version
2. Install PostgreSQL
3. Clone this repository and enter on the respective folder
4. Install dependencies running:
```bash
$ npm install
```

## Running the app

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Create Migration
```bash
# Run migrations
$ npm run db:migrate

# Revert migrations
$ npm run db:rollback
```

## Run Migrations Manually

```bash
$ npx typeorm migration:create -n NameMigration -d src/migrations
```

## Generates models for TypeORM from existing databases
```bash
$ npx typeorm-model-generator -h localhost -d tempdb -u sa -x !Passw0rd -e postgres -o ./typegen -p 3306
```

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

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

## Documentation SWAGGER

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

# access documentation url
http://localhost:3000/api/
```

## Directory Structure

```
├── /src
| ├── /controllers
| ├── /database
| | ├── /migrations
| |
| ├── /helpers
| ├── /middleware
| ├── /models
| ├── /services
| ├── /validators
| ├── /interfaces
|
├── /test
```

## Support

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](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).