当前位置:网站首页>Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
2022-07-06 12:51:00 【知识大胖】
Express.js 是什么
Express.js,或简称 Express,是 Node.js 的后端应用程序框架,在 MIT 许可下作为免费和开源软件发布。它专为构建 Web 应用程序和 API 而设计。它被称为 Node.js 的事实上的标准服务器框架。
核心库
- express — 这是我们将用于构建 api 的 Node.js 模块
- body-parser — Node.js 正文解析中间件
- cors — 这是 node.js 包,用于提供Connect / Express中间件,可用于启用具有各种选项的CORS 。
- helmet — helmet 是一个 Node.js 包,它通过设置各种 http 标头来帮助您保护您的快速应用程序
- morgan — morgan 是一个 Node.js 包,它可以帮助我们知道谁在向我们的 express 应用程序请求 api
- nodemon — nodemon 是一个工具,通过在检测到目录中的文件更改时自动重新启动节点应用程序来帮助开发基于 node.js 的应用程序。
- ts-node — ts-node 是一个 TypeScript 执行引擎和 Node.js 的 REPL。
- typescript
- @types/express、@types/body-parser、@types/cors、@types/helmet、@types/morgan、- @types/node——这个包包含类型定义
安装环境
好的,让我们从安装所有必需的包开始
npm install express body-parser cors helmet morgan
边栏推荐
- 967- letter combination of telephone number
- Reference frame generation based on deep learning
- Data Lake (VIII): Iceberg data storage format
- Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
- PHP online examination system version 4.0 source code computer + mobile terminal
- Notes - detailed steps of training, testing and verification of yolo-v4-tiny source code
- PHP saves session data to MySQL database
- Activiti global process monitors activitieventlistener to monitor different types of events, which is very convenient without configuring task monitoring in acitivit
- ICML 2022 | Flowformer: 任务通用的线性复杂度Transformer
- 【mysql】游标的基本使用
猜你喜欢

Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
![[MySQL] basic use of cursor](/img/cc/39b1e17b48d0de641d3cbffbf2335a.png)
[MySQL] basic use of cursor

Opencv learning example code 3.2.3 image binarization

Data Lake (VIII): Iceberg data storage format

请问sql group by 语句问题

3D人脸重建:从基础知识到识别/重建方法!

Comment faire une radio personnalisée

【论文解读】用于白内障分级/分类的机器学习技术

OAI 5g nr+usrp b210 installation and construction

2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
随机推荐
OSPF多区域配置
自定义限流注解
use. Net analysis Net talent challenge participation
How to turn a multi digit number into a digital list
R语言可视化两个以上的分类(类别)变量之间的关系、使用vcd包中的Mosaic函数创建马赛克图( Mosaic plots)、分别可视化两个、三个、四个分类变量的关系的马赛克图
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
如何实现常见框架
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
Opencv learning example code 3.2.3 image binarization
968 edit distance
Mécanisme de fonctionnement et de mise à jour de [Widget Wechat]
Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
Select data Column subset in table R [duplicate] - select subset of columns in data table R [duplicate]
No Yum source to install SPuG monitoring
Database - how to get familiar with hundreds of tables of the project -navicat these unique skills, have you got it? (exclusive experience)
Is it safe to open an account in flush? Which securities company is good at opening an account? Low handling charges
LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
Reflection operation exercise
Minimum cut edge set of undirected graph