Git Product home page Git Product logo

nest-http-boilerplate's Introduction

Nest Http Template

A NestJS template, which used the coolest and fastest stuff.

image

Which Tech Stack In Use

  • Framework: NestJS (Based on Fastify)
  • Language: TypeScript (Best practices, Not AnyScript)
  • Database ODM: Typegoose (Write schema once all in TypeScript)
  • Bundle Toolchain: @vercel/ncc Bundle (Bundle entry, go node_modules away)
  • Testing: Vitest (Test case write in TypeScript, fast and out-of-box)
  • Package Manager: PNPM (which is fastest)
  • DevOps: Docker
  • Other: Prettier, ESLint, Husky, Bump Version, etc.

How to start development

npm run dev

File Structure

.
├── app.config.ts                 # 主程序配置,数据库、程序、第三方,一切可配置项
├── app.controller.ts             # 主程序根控制器
├── app.module.ts                 # 主程序根模块,负责各业务模块的聚合
├── common                        # 存放中间件
│   ├── adapters                  # 适配器的配置
│   ├── decorator                 # 业务装饰器
│   ├── exceptions                # 自定义异常
│   ├── filters                   # 异常处理器
│   ├── guard                     # 守卫与鉴权
│   ├── interceptors              # 拦截器, 数据过滤与响应格式化处理
│   ├── middlewares               # 传统意义上的中间件
│   └── pipes                     # 管道
├── constants                     # 常量
├── main.ts                       # 引入配置,启动主程序,引入各种全局服务
├── modules                       # 业务逻辑模块
├── processors                      # 核心辅助模块
│   ├── cache                       # Redis 缓存相关
│   ├── database                    # Mongo 数据库相关
│   ├── gateway                     # Socket.IO 相关
│   ├── helper                      # 辅助类
│   └── logger                      # 自定义 Logger
├── shared                          # 通用模型
│   ├── dto                         # 数据验证模型
│   ├── interface                   # 接口
│   └── model                       # 基本数据模型
├── utils                           # 工具类
├── bootstrap.ts                    # 引导程序
└── main.ts                         # 入口

Docs

Please visit docs folder under this project.

Authors

Innei.

nest-http-boilerplate's People

Contributors

renovate[bot] avatar innei avatar zhengbangbo 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.