GithubHelp home page GithubHelp logo

nest-starter's Introduction

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

NPM Version Package License NPM Downloads Travis Linux Coverage Gitter Backers on Open Collective Sponsors on Open Collective

Description

Nest framework TypeScript starter repository.

学前准备

  • vscode 编辑器
  • chrome 浏览器
  • iterm2 命令行工具
  • postman 接口调试工具
  • Sourcetree git 可视化工具

序言

在这次学习过程中, 您将了解 Nest 的核心基础知识。主要是了解基本的 nest 应用程序构建模块。

2020-5-17 更新

代码中15次commit,包含以下模块:

1.初始化项目

2.添加控制器

3.添加swagger文档支持

4.添加日志

5.添加错误处理

6.添加pipe

7.添加权限控制

8.邮件服务

9.config配置

10.监控

11.jwt的token令牌支持以及鉴权

12.基于mysql的讲解

13.任务队列

14.文件上传文件下载

如果有同学学习之后有心得,欢迎提PR书写以上对应模块的心得分享。

TODO-list

  • 微服务
  • 消息系统(Kafka)日志系统
  • MongoDB + Mongoose
  • TCP + redis

环境依赖

请确保您的操作系统上安装了 Node.js(> = 6.11.0)。

建立

使用Nest CLI 建立项目非常简单。只要确保你已经安装了npm,然后在你的 OS 终端中使用以下命令:

$ npm i -g @nestjs/cli

$ nest new project

project 目录将在 src 目录中包含几个核心文件。

  • src
    • app.controller.ts
    • app.module.ts
    • main.ts

按照约定,新创建的模块应该有一个专用目录。

文件 描述
main.ts 应用程序入口文件。它使用 NestFactory 用来创建 Nest 应用实例。
app.module.ts 定义 AppModule 应用程序的根模块。
app.controller.ts 带有单个路由的基本控制器示例。

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

QQ交流群

787585478

nest-starter's People

Contributors

dependabot[bot] avatar heyimaster 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.