当前位置:网站首页>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
边栏推荐
- el-table表格——sortable排序 & 出现小数、%时排序错乱
- Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
- 监控界的最强王者,没有之一!
- @GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
- Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
- Swagger UI tutorial API document artifact
- 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
- 2110 summary of knowledge points and common problems in redis class
- Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
- 2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
猜你喜欢

Data Lake (VIII): Iceberg data storage format

Study notes of grain Mall - phase I: Project Introduction

【mysql】触发器

【Redis设计与实现】第一部分 :Redis数据结构和对象 总结
![[wechat applet] operation mechanism and update mechanism](/img/cf/58a62a7134ff5e9f8d2f91aa24c7ac.png)
[wechat applet] operation mechanism and update mechanism

This year, Jianzhi Tencent

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

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

爱可可AI前沿推介(7.6)

3D人脸重建:从基础知识到识别/重建方法!
随机推荐
Summary of different configurations of PHP Xdebug 3 and xdebug2
C # use Oracle stored procedure to obtain result set instance
Comprehensive evaluation and recommendation of the most comprehensive knowledge base management tools in the whole network: flowus, baklib, jiandaoyun, ones wiki, pingcode, seed, mebox, Yifang cloud,
Pycharm remote execution
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
JS操作dom元素(一)——获取DOM节点的六种方式
Select data Column subset in table R [duplicate] - select subset of columns in data table R [duplicate]
'class file has wrong version 52.0, should be 50.0' - class file has wrong version 52.0, should be 50.0
[wechat applet] operation mechanism and update mechanism
js之遍历数组、字符串
Minimum cut edge set of undirected graph
Web开发小妙招:巧用ThreadLocal规避层层传值
Opencv learning example code 3.2.3 image binarization
PHP saves session data to MySQL database
Common English vocabulary that every programmer must master (recommended Collection)
7. Data permission annotation
R語言可視化兩個以上的分類(類別)變量之間的關系、使用vcd包中的Mosaic函數創建馬賽克圖( Mosaic plots)、分別可視化兩個、三個、四個分類變量的關系的馬賽克圖
##无yum源安装spug监控
Simple continuous viewing PTA
请问sql group by 语句问题