NestJS 用TypeScript开发 nodeJS后端



import { Module } from '@nestjs/common';
import { CatsController } from './cats/cats.controller';
import { CatsService } from './cats/cats.service';
@Module({
controllers: [CatsController],
components: [CatsService],
})
export class ApplicationModule {}
import { Module } from '@nestjs/common';
import { CatsController } from './cats/cats.controller';
import { CatsService } from './cats/cats.service';
@Module({
controllers: [CatsController],
components: [CatsService],
})
export class ApplicationModule {}
npm start
> nest-typescript-starter@1.0.0 start E:\NestJS\nest\examples\01-cats-app
> node index.js
[Nest] 12736 - 2018-1-5 09:11:29 [NestFactory] Starting Nest application...
[Nest] 12736 - 2018-1-5 09:11:29 [InstanceLoader] ApplicationModule dependencies initialized +7ms
[Nest] 12736 - 2018-1-5 09:11:29 [InstanceLoader] CatsModule dependencies initialized +2ms
[Nest] 12736 - 2018-1-5 09:11:29 [RoutesResolver] CatsController {/cats}: +29ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/, POST} route +1ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/, GET} route +0ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/:id, GET} route +1ms
[Nest] 12736 - 2018-1-5 09:11:29 [NestApplication] Nest application successfully started +1ms
npm start
> nest-typescript-starter@1.0.0 start E:\NestJS\nest\examples\01-cats-app
> node index.js
[Nest] 12736 - 2018-1-5 09:11:29 [NestFactory] Starting Nest application...
[Nest] 12736 - 2018-1-5 09:11:29 [InstanceLoader] ApplicationModule dependencies initialized +7ms
[Nest] 12736 - 2018-1-5 09:11:29 [InstanceLoader] CatsModule dependencies initialized +2ms
[Nest] 12736 - 2018-1-5 09:11:29 [RoutesResolver] CatsController {/cats}: +29ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/, POST} route +1ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/, GET} route +0ms
[Nest] 12736 - 2018-1-5 09:11:29 [RouterExplorer] Mapped {/:id, GET} route +1ms
[Nest] 12736 - 2018-1-5 09:11:29 [NestApplication] Nest application successfully started +1ms



NestJS 用TypeScript开发 nodeJS后端的更多相关文章
- CabloyJS全栈开发之旅(1):NodeJS后端编译打包全攻略
背景 毋庸置疑,NodeJS全栈开发包括NodeJS在前端的应用,也包括NodeJS在后端的应用.CabloyJS前端采用Vue+Framework7,采用Webpack进行打包.CabloyJS后端 ...
- 使用Visual Studio Code搭建TypeScript开发环境
使用Visual Studio Code搭建TypeScript开发环境 1.TypeScript是干什么的 ? TypeScript是由微软Anders Hejlsberg(安德斯·海尔斯伯格,也是 ...
- 搭建typescript开发环境最详细的全过程
搭建typescript开发示例https://github.com/Microsoft/TypeScriptSamples typescript案例https://www.tslang.cn/sam ...
- TypeScript开发环境搭建(Visual studio code)
使用Visual Studio Code搭建TypeScript开发环境 1.TypeScript是干什么的 ? TypeScript是由微软Anders Hejlsberg(安德斯·海尔斯伯格,也是 ...
- 第二章 TypeScript 开发环境搭建
Mac OS X 下 TypeScript 开发环境搭建 一.集成开发环境 WebStrom VSCode 二.安装 TypeScript Homebrew(macOS 缺失的软件包管理器) ruby ...
- VSCode搭建node + typescript开发环境
我们一起来喜欢TypeScript 现在写js不用TypeScript,伦家可能会觉得你是外星人. 是的,TypeScript很大程度增强了代码的可读性,可跟踪性,可维护性和减少了bug. 那么没有理 ...
- 使用Visual Studio Code + Node.js搭建TypeScript开发环境
Visual Studio Code搭建Typescript开发环境 —— 相关文章: http://www.cnblogs.com/sunjie9606/p/5945540.html [注意:这里仅 ...
- 001——Typescript 介绍 、Typescript 安 装、Typescript 开发工具
一. Typescript 介绍 1. TypeScript 是由微软开发的一款开源的编程语言. 4. TypeScript 是 Javascript 的超级,遵循最新的 ES6.Es5 规范.Typ ...
- 使用 VS Code 搭建 TypeScript 开发环境
使用 VS Code 搭建 TypeScript 开发环境 TypeScript 是 JavaScript 的超集,TypeScript 只是增强了 JavaScript 而非改变了 JavaScri ...
随机推荐
- 部分类Partial
Partial告诉编译器,一个类,结构,接口的定义源代码可能要分散到一个或者多个源文件中. 在下面的情况下用Partial类型: (1) 类型特别大,不宜放在一个文件中实现.(2) 一个类型中的一部分 ...
- 可epoll队列
什么是可epoll队列? 就可以使用epoll来监控队列中是否有数据的队列,当然也支持select和poll. 应用场景 一个线程,需要将队列(共享内存队列或普通队列均可)中的数据取出来,然后通过网络 ...
- Creating Custom UITableViewCells with NIB files
Maksim Pecherskiy 13 November 2012 Well this sucks. Apparently these days you can only use the Inter ...
- C#中的异步调用及异步设计模式(三)——基于事件的异步模式
四.基于事件的异步模式(设计层面) 基于事件的C#异步编程模式是比IAsyncResult模式更高级的一种异步编程模式,也被用在更多的场合.该异步模式具有以下优点: · ...
- idea中java文件打包出去步骤
打包出去之后 通过xftp放在Linus上面去运行 然后用hadoop fs -put 放到hadoop集群上面(而且此时在/user/hadoop下面创建好input文件夹和一个输入的文件) 即 ...
- JDK8新特性:使用stream、Comparator和Method Reference实现集合的优雅排序
大家对java接口Comparator和Comparable都不陌生,JDK8里面Comparable还和以前一样,没有什么改动:但是Comparator在之前基础上增加了很多static和defau ...
- Mac上修改MySQL默认字符集为utf8
1.检查默认安装的mysql的字符集 mysql> show variables like '%char%'; +--------------------------+------------- ...
- RobotFramework做接口自动化(内部接口需要登录token)
背景: 项目中需要做接口自动化测试,使用robot,有一个收货地址列表的接口直接传参数访问时会返回:{"msg":"缺少参数","code" ...
- redis详细说明
# By default Redis does not run as a daemon. Use 'yes' if you need it.# Note that Redis will write a ...
- python学习之路 四 :文件处理
本节重点 掌握文件的读.写.修改方法 掌握文件的处理模式的区别 一.文件读取 1.读取全部内容 # 一次性读取文件 f = open("test.txt",'r',en ...