https://github.com/4lessandrodev/nest-template
A template using nestjs and graphql
https://github.com/4lessandrodev/nest-template
Last synced: about 1 year ago
JSON representation
A template using nestjs and graphql
- Host: GitHub
- URL: https://github.com/4lessandrodev/nest-template
- Owner: 4lessandrodev
- Created: 2021-09-05T23:17:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T19:11:12.000Z (over 3 years ago)
- Last Synced: 2025-01-07T14:23:57.155Z (about 1 year ago)
- Language: TypeScript
- Size: 1.47 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nest App Template
Template to start a new app using Nest
> Application run on localhost:3000/graphql
* NestJS
* Jest
* Graphql Request
* Husky
* Commit-Lint
* Module-Alias
* Typescript
* Lint Staged
* Types-DDD
* DDD Module Generator
* Graphql
* EnvVar
* Env-cmd
* Stryker Mutator
* Graphql Codegen
* Docker
## How to use this template
Docker is configured on this repo
Ensure you have a database or use docker-compose to up a database instance
* Clone this template
* `$ git clone https://github.com/4lessandrodev/nest-template.git `
* Access project folder
* `$ cd `
* Create your env file on root folder
* `$ cp ./.env.example ./.env`
* Install dependencies
* `$ yarn`
* Start app
* `$ yarn start:dev`
* Access playground
* `localhost:3000/graphql`
### Create new modules
* Generate your module
* `$ yarn generate `
### Running tests
* Unit tests
* `$ yarn test`
* Mutation tests
* `$ yarn test:mutation`
* End to end
* `$ yarn test:e2e`
### Generate graphql types
This template is configured with graphql codegen.
> Run application before generate types
* Generate types
* `$ yarn generate:gql`
### Alias to import files
Available alias to import files
* From modules folder use: `@modules/...`
* From src folder use: `@app/...`
* From config folder use: `@config/...`
* From shared folder use: `@shared/...`