Giter Site home page Giter Site logo

nestjs-api-example's Introduction

NestJS API Example

NestJS API Boilerplate

설치 및 구성

# 1. 프로젝트 생성
git clone [email protected]:JHyeok/nestjs-api-example.git nestjs-project

# 2. 프로젝트 폴더로 이동
cd nestjs-project

# 3. 의존성 설치
yarn install

설치가 끝났으면 src/.env.example을 복사해서 .env를 만듭니다.

.env를 본인이 사용하려는 DB 연결 정보에 맞게 수정하면 됩니다.

Docker 로컬 개발환경

docker-compose.yml

  • E2E 테스트, 통합 테스트를 위한 테스트 데이터베이스 환경을 구성할 수 있습니다.

docker-compose.dev.yml

  • DB와 NestJS 앱을 실행하는 목적으로 사용합니다.
  • Dockerfile.dev를 사용합니다.

Dockerfile.dev는 로컬에서 개발 환경으로 사용하는 목적이고 Dockerfile은 운영 환경에서 사용할 수 있도록 최적화했습니다.

# 테스트 데이터베이스 실행
$ docker-compose up -d

# 실행
$ docker-compose -f docker-compose.dev.yml up -d

# 빌드
$ docker-compose -f docker-compose.dev.yml build

# 재시작
$ docker-compose -f docker-compose.dev.yml restart

# 중지
$ docker-compose -f docker-compose.dev.yml down

# 중지 (도커 볼륨 삭제)
$ docker-compose -f docker-compose.dev.yml down -v

실행

# 운영 환경으로 실행
$ yarn start:prod

# 개발 환경으로 실행
$ yarn start:dev

테스트

$ yarn test

nestjs-api-example's People

Contributors

dependabot[bot] avatar jhyeok avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nestjs-api-example's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/supertest to v6
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency prettier to v3
  • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency helmet to v7
  • fix(deps): update dependency rimraf to v5
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

docker-compose
docker-compose.dev.yml
  • mysql 8.0.36
docker-compose.yml
  • mysql 8.0.36
dockerfile
Dockerfile
  • node 20.9.0-alpine
  • node 20.9.0-alpine
Dockerfile.dev
  • node 20.9.0-alpine
  • node 20.9.0-alpine
npm
package.json
  • @nestjs/common ^10.2.10
  • @nestjs/core ^10.2.10
  • @nestjs/platform-express ^10.2.10
  • @nestjs/swagger ^7.1.16
  • @nestjs/typeorm ^10.0.1
  • class-transformer ^0.5.1
  • class-validator ^0.14.0
  • helmet ^6.2.0
  • mysql2 ^3.9.2
  • reflect-metadata ^0.1.13
  • rimraf ^3.0.2
  • rxjs ^7.8.1
  • typeorm ^0.3.20
  • @nestjs/cli ^10.2.1
  • @nestjs/schematics ^10.0.3
  • @nestjs/testing ^10.2.10
  • @swc-node/jest ^1.6.8
  • @swc/core ^1.3.99
  • @swc/helpers ^0.5.3
  • @types/express ^4.17.21
  • @types/express-rate-limit ^6.0.0
  • @types/helmet ^4.0.0
  • @types/jest ^29.5.10
  • @types/node ^20.10.0
  • @types/supertest ^2.0.16
  • @typescript-eslint/eslint-plugin ^5.62.0
  • @typescript-eslint/parser ^5.62.0
  • eslint ^8.54.0
  • eslint-config-prettier ^8.10.0
  • eslint-plugin-import ^2.29.0
  • husky ^8.0.3
  • jest ^29.7.0
  • lint-staged ^13.3.0
  • prettier ^2.8.8
  • sqlite3 ^5.1.6
  • supertest ^6.3.3
  • ts-loader ^9.5.1
  • ts-node ^10.9.1
  • tsconfig-paths ^4.2.0
  • typescript ^5.3.3
nvm
.nvmrc
  • node v20.9.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.