All Projects → smarlhens → nest-boilerplate

smarlhens / nest-boilerplate

Licence: other
Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, Travis CI, TypeORM

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to nest-boilerplate

node-backend-template
A template for NodeJS backend projects
Stars: ✭ 19 (+18.75%)
Mutual labels:  eslint, prettier, typeorm, commitlint
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+2300%)
Mutual labels:  commitizen, husky, lint-staged, commitlint
ts-nextjs-tailwind-starter
🔋 Next.js + Tailwind CSS + TypeScript starter packed with useful development features
Stars: ✭ 880 (+5400%)
Mutual labels:  eslint, husky, github-actions
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (+6.25%)
Mutual labels:  eslint, prettier, husky
awesome-address-book
This project shows a basic address book built with ReactJS, Redux Toolkit and Typescript 📖
Stars: ✭ 20 (+25%)
Mutual labels:  eslint, prettier, github-actions
nestjs-rest-cqrs-example
Example for Nest.js, MySQL, Redis, REST api, CQRS, DDD
Stars: ✭ 263 (+1543.75%)
Mutual labels:  nest, typeorm, nestjs
zero
📦 A zero config scripts library
Stars: ✭ 17 (+6.25%)
Mutual labels:  eslint, prettier, lint-staged
elint
A easy way to lint your code
Stars: ✭ 38 (+137.5%)
Mutual labels:  eslint, husky, commitlint
ci-skip
CI skip comment
Stars: ✭ 35 (+118.75%)
Mutual labels:  circleci, travis-ci, github-actions
OSAPI
👋 OSAPI 是依靠通用性后台管理平台搭建的API管理平台,基于 vue3、Nestjs 技术栈实现,包含 RBAC 角色权限模块、数据展示、编辑等模块。
Stars: ✭ 32 (+100%)
Mutual labels:  eslint, prettier, nestjs
googletest-ci
Continuous integration (CI) + Google Test (gtest) + CMake example boilerplate demo
Stars: ✭ 14 (-12.5%)
Mutual labels:  circleci, travis-ci, github-actions
mom
Proof of concept for Message-Oriented-Middleware based architecture.
Stars: ✭ 39 (+143.75%)
Mutual labels:  nest, typeorm, nestjs
CI-Utils
Utilities for running Common Lisp on CI platforms
Stars: ✭ 18 (+12.5%)
Mutual labels:  circleci, travis-ci, github-actions
uno-game
🎴 An UNO Game made in Javascript
Stars: ✭ 93 (+481.25%)
Mutual labels:  eslint, husky, lint-staged
typescript-api-starter
🔰 Starter for Node.js express API in Typescript 🚀
Stars: ✭ 72 (+350%)
Mutual labels:  eslint, prettier, github-actions
react-native-template-basic
A simple React Native template with ESlint, Enzyme, Flow, Prettier and custom scripts
Stars: ✭ 14 (-12.5%)
Mutual labels:  eslint, prettier, lint-staged
nestjs-starter
🚀 Nest framework starter
Stars: ✭ 30 (+87.5%)
Mutual labels:  nest, typeorm, nestjs
fe-standard-config-seed
前端通用代码规范自动化接入
Stars: ✭ 18 (+12.5%)
Mutual labels:  prettier, commitizen, commitlint
cra-template-react-template
🤘 My bootstrap template to use in react
Stars: ✭ 15 (-6.25%)
Mutual labels:  eslint, commitizen, husky
drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+756.25%)
Mutual labels:  circleci, travis-ci, github-actions

Nest Logo

Nest 8 - Boilerplate

GitHub CI CircleCI Build Status Commitizen friendly code style: prettier Conventional Commits GitHub issues GitHub pull requests GitHub stars GitHub forks GitHub contributors GitHub license GitHub code size in bytes GitHub repo size

Table of contents


Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things you need to install the software and how to install them :


Installation

  1. Clone the git repository

    git clone https://github.com/smarlhens/nest7-boilerplate.git
  2. Go into the project directory

    cd nest7-boilerplate/
  3. Checkout working branch

    git checkout <branch>
  4. Install NPM dependencies

    npm i
  5. Copy .env.dist to .env

    cp .env.dist .env
  6. Replace the values of the variables with your own

  7. Create Docker images and launch them

    docker-compose up -d --build

What's in the box ?

CircleCI

CircleCI automates your software builds, tests, and deployments.

CircleCI pipeline file: .circleci/config.yml.

For more configuration options and details, see the configuration docs.


Commitizen

commitizen is a command line utility that makes it easier to create commit messages following the conventional commit format specification.

Use git cz instead of git commit to use commitizen.

Add and commit with Commitizen

Configuration file: .czrc.


Commitlint

commitlint checks if your commit messages meet the conventional commit format.

Configuration file: .commitlintrc.

In general the pattern mostly looks like this:

type(scope?): subject  #scope is optional

Are you a good commitizen ?


Docker & Docker-Compose

Compose file: docker-compose.yml.

Containers :

  • PostGreSQL 12
  • pgAdmin 4

Compose file uses .env.


ESLint

ESLint is a fully pluggable tool for identifying and reporting on patterns in JavaScript.

Configuration file: .eslintrc.js.

For more configuration options and details, see the configuration docs.


GitHub Actions

GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.

CI workflow file: .github/workflows/ci.yml.


Husky

Husky is a package that helps you create Git hooks easily.

Configuration file: .huskyrc.


Lint-staged

Lint-staged is a Node.js script that allows you to run arbitrary scripts against currently staged files.

Configuration file: .lintstagedrc.


Prettier

Prettier is an opinionated code formatter.

Configuration file: .prettierrc.
Ignore file: .prettierignore.

For more configuration options and details, see the configuration docs.


Travis CI

Travis CI is a hosted continuous integration service used to build and test software projects hosted at GitHub.

Travis build file: .travis.yml.

For more configuration options and details, see the configuration docs.


Running the app

development

npm run start

watch mode

npm run start:dev

production mode

npm run start:prod

Code scaffolding

Run nest generate|g <schematic> <name> [options] to generate a new Nest Element.


Build

Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.


Test

unit tests

npm run test

e2e tests

npm run test:e2e

test coverage

npm run test:cov

Further help

To get more help on the Nest CLI use nest --help or go check out the Nest CLI README.


Useful Docker commands

  1. If you want to check that all containers are up :

    docker-compose ps
  2. Other Docker commands :

    # Start Docker
    docker-compose start
    
    # Restart Docker
    docker-compose restart
    
    # Stop Docker
    docker-compose stop
    
    # Delete all containers
    docker rm $(docker ps -aq)
    
    # Delete all images
    docker rmi $(docker images -q)
  3. How to get a Docker container's IP address from the host ?

    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container>
    docker inspect $(docker ps -f name=<service> -q) | grep IPAddress

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].