当前位置:网站首页>项目后台技术Express
项目后台技术Express
2022-08-02 01:55:00 【抹茶生活】
介绍三个方面:
一、Express的安装和使用;
二、Express项目的路由定义;
三、Express项目的静态资源管理;
一、Express的安装和使用
Express应用程序生成器
1.快速创建一个应用框架
npm install express-generator -g
创建好了可以用express -h查看express有哪些常用的命令
2.新建express应用 ,构建了一个不包含模板显示功能的Express服务端应用
express --no-view myapp
3.根据命令提示安装依赖
二、Express提供的路由
Express提供了路由,通过定义路由,可以设计不同的URI地址,可以支持HTTP的各种不同的方法(包括GET、POST和其他请求方式)
在这里遇到一个错误就是发送路由请求无法get
安装Mongodb
npm install mongoose -save
在app.js里面添加如下文件
启动myapp
set DEBUG=myapp * & npm start
边栏推荐
猜你喜欢
随机推荐
typescript37-class的构造函数实例方法继承(extends)
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
typescript31-any类型
typescript30-any类型
软件测试 接口自动化测试 pytest框架封装 requests库 封装统一请求和多个基础路径处理 接口关联封装 测试用例写在yaml文件中 数据热加载(动态参数) 断言
【ORB_SLAM2】void Frame::ComputeImageBounds(const cv::Mat &imLeft)
Image fusion based on weighted 】 and pyramid image fusion with matlab code
3. Bean scope and life cycle
Hash collisions and consistent hashing
AntPathMatcher使用
Coding Experience Talk
Day115.尚医通:后台用户管理:用户锁定解锁、详情、认证列表审批
乱七八糟的网站
Local storage in Kubernetes
Understand the big model in seconds | 3 steps to get AI to write a summary
『网易实习』周记(三)
Shell入门终章
¶Backtop 回到顶部 不生效
For effective automated testing, these software testing tools must be collected!!!
字节给我狠狠上了一课:危机来的时候你连准备时间都没有...