Skip to content

jeanc-alves/NestApi

Repository files navigation

Nest Logo

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 framework TypeScript starter repository.

Installation

$ yarn install

Configure Database | Env

Inside the project there is a env.example file duplicate that and rename to .env
configure your database url settings like that:
DATABASE_URL="postgresql://postgres:root@localhost:5432/nest?schema=public"

or like that:
DATABASE_PROVIDER=postgresql
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE=nest
DATABASE_USER=postgres
DATABASE_PASSWORD=root
DATABASE_URL="${DATABASE_PROVIDER}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE}?schema=public"

Configure nodemailer email provider

I am using Ethereal to test Configure your .env file with yours configs regarding Nodemailer provider:

SMTP_HOST=smtp.ethereal.email
SMTP_PORT=587
SMTP_SECURITY=STARTLS
SMTP_USERNAME=jon38@ethereal.email
SMTP_PASSWORD=hMyjGYUjh71M8yttZ1

Created Database Tables by PRISMA ORM and

npx prisma migrate dev --name initial_migration_database

Create User by seed

npx prisma db seed
[{email: '[email protected]', password: 'senha123'}
{email: '[email protected]', password: 'senha123'}]

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Runing Rabbit MQ

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.12-management

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.

Stay in touch

License

Nest is MIT licensed.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published