nestjs-typescript-starter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NestJS TypeScript Starter

NestJS TypeScript 启动模板

The official NestJS starter with modular architecture and testing.
官方NestJS启动模板,采用模块化架构并支持测试。

Tech Stack

技术栈

  • Framework: NestJS
  • Language: TypeScript
  • Testing: Jest
  • Package Manager: npm
  • 框架: NestJS
  • 语言: TypeScript
  • 测试: Jest
  • 包管理器: npm

Setup

设置步骤

1. Clone the Template

1. 克隆模板

bash
git clone --depth 1 https://github.com/nestjs/typescript-starter.git .
If the directory is not empty:
bash
git clone --depth 1 https://github.com/nestjs/typescript-starter.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
bash
git clone --depth 1 https://github.com/nestjs/typescript-starter.git .
如果目标目录非空:
bash
git clone --depth 1 https://github.com/nestjs/typescript-starter.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template

2. Remove Git History (Optional)

2. 移除Git历史记录(可选)

bash
rm -rf .git
git init
bash
rm -rf .git
git init

3. Install Dependencies

3. 安装依赖

bash
npm install
bash
npm install

Build

构建

bash
npm run build
bash
npm run build

Development

开发

bash
npm run start:dev
bash
npm run start:dev