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 服务器的教程
- Host: GitHub
- URL: https://github.com/cuixiaorui/tutorial-node-typescript
- Owner: cuixiaorui
- Created: 2019-06-16T07:46:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T19:15:02.000Z (about 3 years ago)
- Last Synced: 2024-11-06T17:49:50.204Z (about 1 year ago)
- Language: TypeScript
- Size: 215 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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 的配置功能点