GithubHelp home page GithubHelp logo

tackulmine / nestjs-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brocoders/nestjs-boilerplate

0.0 1.0 0.0 2.85 MB

NestJS boilerplate. Auth, TypeORM, Postgres, Mailing, I18N, Docker.

Shell 6.17% JavaScript 0.96% TypeScript 90.03% Handlebars 2.30% Dockerfile 0.43% Procfile 0.10%

nestjs-boilerplate's Introduction

NestJS REST API boilerplate πŸ‡ΊπŸ‡¦

Description

NestJS REST API boilerplate for typical project

Table of Contents

Features

Quick run

git clone --depth 1 https://github.com/brocoders/nestjs-boilerplate.git my-app
cd my-app/
cp env-example .env
docker-compose up -d

For check status run

docker-compose logs

Comfortable development

git clone --depth 1 https://github.com/brocoders/nestjs-boilerplate.git my-app
cd my-app/
cp env-example .env

Change DATABASE_HOST=postgres to DATABASE_HOST=localhost

Change MAIL_HOST=maildev to MAIL_HOST=localhost

Run additional container:

docker-compose up -d postgres adminer maildev redis
npm install

npm run migration:run

npm run seed:run

npm run start:dev

Links

Automatic update of dependencies

If you want to automatically update dependencies, you can connect Renovate for your project.

Database utils

Generate migration

npm run migration:generate -- CreateNameTable

Run migration

npm run migration:run

Revert migration

npm run migration:revert

Drop all tables in database

npm run schema:drop

Run seed

npm run seed:run

Tests

# unit tests
npm run test

# e2e tests
npm run test:e2e

Tests in Docker

docker-compose -f docker-compose.ci.yaml --env-file env-example -p ci up --build --exit-code-from api && docker-compose -p ci rm -svf

Test benchmarking

docker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3000/api/v1/users

nestjs-boilerplate's People

Contributors

renovate-bot avatar shchepotin avatar dependabot[bot] avatar dependabot-preview[bot] avatar valeragin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.