An open API service indexing awesome lists of open source software.

https://github.com/cuixiaorui/tutorial-node-typescript

使用 ts 编写 express 服务器的教程
https://github.com/cuixiaorui/tutorial-node-typescript

Last synced: 2 months ago
JSON representation

使用 ts 编写 express 服务器的教程

Awesome Lists containing this project

README

          

# tutorial-node-typescript
使用 ts 编写 express 服务器的教程

## 使用

```
// 安装
yarn install

// 运行
npm run dev

// 编译
npm run build

// 执行编译后的 js 文件
npm run start
```
打开浏览器输入: http://localhost:3001/?a=10&b=20

## 描述
1. 使用 ts 开发 express 服务器
2. 使用 nodemon 自动刷新,必须搭配 ts-node(可以直接运行 ts)
3. types 的概念(ts 提示)
4. tsc 命令把 ts 编译成 js
5. tsconfig 的配置功能点