Standard and basic structure to assist in the quick start of tests, projects, pocs with this technology.
*pt-br
Estrutura padrão e básica para auxiliar no início rápido de testes, projetos, pocs com esta tecnologia.
Structure was based on
Nest framework TypeScript starter repository.
A progressive Node.js framework for building efficient and scalable server-side applications. |
- Modular Structure
- Defines for Style and Linting (ESLint, Prettier, EditorConfig)
- Node > 18.x
- Database (Mysql, Postgres)
- Docker > 18.06 (Optional)
- For testing I using https://github.com/ricardo-melo-martins/docker
Cloning
git clone https://github.com/ricardo-melo-martins/nestjs-skeleton.git
... entering on nestjs-skeleton dir
cd nestjs-skeleton
composer install
# make it yours (optional)
rm -rf .git
Copy example environment
cp ./config/.env.example .env
then change the configuration according to the database you want to use.
DATABASE_DEFAULT_TYPE=mysql
DATABASE_DEFAULT_HOST=127.0.0.1
DATABASE_DEFAULT_PORT=3306
DATABASE_DEFAULT_DATABASE=my_database
DATABASE_DEFAULT_USERNAME=root
DATABASE_DEFAULT_PASSWORD=YourP@ssw0rd!
# development
npm run start
# watch mode
npm run start:dev
# production mode
npm run start:prod
# unit tests
npm run test
# e2e tests
npm run test:e2e
# test coverage
npm run test:cov
Nest is MIT licensed.