Skip to content

mpaternostro/graphql-todo-api

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

GraphQL Todo API built on NestJS.

  • Authentication
  • Everything tested with Unit and E2E tests with Jest and Supertest
  • Fully typed with TypeScript
  • PostgreSQL + TypeORM
  • ESLint + Prettier for static code analysis and code formatting
  • API Hosted on Heroku

Installation

  • Create .env and docker.env files in project's root, following .env.dist and docker.env.dist hints (I consider JWT_ACCESS_TOKEN_EXPIRATION_TIME=1d and JWT_REFRESH_TOKEN_EXPIRATION_TIME=1w nice defaults)
  • To edit code, it's recommended to install ESLint, Prettier and Jest IDE extensions
  • Install Docker. Server, DB and DB admin easily runs on a Docker container for ease of use and isolation

Running app in development

# server defaults to localhost:3000
$ docker-compose up

Deploying

Configure in Heroku, add Heroku Postgres add-on and add config vars in Settings.

  • If any changes to entities were made, you should run migrations with npm run typeorm:generate-migrations and npm run typeorm:run-migrations.

Running tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

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

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

GraphQL Todo CRUD API built on NestJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors