当前位置:网站首页>Nodejs tutorial expressjs article quick start
Nodejs tutorial expressjs article quick start
2022-07-06 21:09:00 【Knowledge fatness】
What is? Expressjs
Express It is used on the server side Web Application's Node.js frame .Express be based on Node.js Function building , It can provide simple and fast Web And mobile server solutions . It is an open source framework , from Node.js Community maintenance . stay Express Many other libraries have been built on , Many large technology companies are using Express.
Project environment construction
Suppose you have installed Node.js, Create a directory to save your application , And set it as your working directory .
mkdir myapp
cd myapp
Use this npm init Command to create a package.json file . About how package.json Working
npm init
Now install in the directory Express And save it in the dependency list . for example :
npm install express
Project source code
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
Project operation
Run the application with the following command :
node index.js
边栏推荐
- OAI 5g nr+usrp b210 installation and construction
- Math symbols in lists
- User defined current limiting annotation
- Entity alignment two of knowledge map
- [MySQL] trigger
- Nodejs教程之Expressjs一篇文章快速入门
- The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
- Data Lake (VIII): Iceberg data storage format
- 【mysql】游标的基本使用
- 什么是RDB和AOF
猜你喜欢

ICML 2022 | flowformer: task generic linear complexity transformer

全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀

2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性

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

Interviewer: what is the internal implementation of ordered collection in redis?

967- letter combination of telephone number

基于深度学习的参考帧生成

SAP Fiori应用索引大全工具和 SAP Fiori Tools 的使用介绍

【滑动窗口】第九届蓝桥杯省赛B组:日志统计

Variable star --- article module (1)
随机推荐
'class file has wrong version 52.0, should be 50.0' - class file has wrong version 52.0, should be 50.0
快过年了,心也懒了
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
#yyds干货盘点#重新梳理箭头函数的this
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
每个程序员必须掌握的常用英语词汇(建议收藏)
正则表达式收集
C # use Oracle stored procedure to obtain result set instance
OSPF multi zone configuration
PG基础篇--逻辑结构管理(事务)
Pycharm remote execution
C language games - three chess
Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
Huawei device command
[MySQL] trigger
js通过数组内容来获取数组下标
Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
@GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
Infrared thermometer based on STM32 single chip microcomputer (with face detection)