当前位置:网站首页>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
边栏推荐
- C language operators
- How to turn a multi digit number into a digital list
- Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
- 2017 8th Blue Bridge Cup group a provincial tournament
- Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
- SAP Fiori应用索引大全工具和 SAP Fiori Tools 的使用介绍
- Notes - detailed steps of training, testing and verification of yolo-v4-tiny source code
- use. Net analysis Net talent challenge participation
- 华为设备命令
- 正则表达式收集
猜你喜欢
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
[MySQL] basic use of cursor
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
ICML 2022 | flowformer: task generic linear complexity transformer
3D人脸重建:从基础知识到识别/重建方法!
新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条
每个程序员必须掌握的常用英语词汇(建议收藏)
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,
随机推荐
js中,字符串和数组互转(一)——字符串转为数组的方法
[200 opencv routines] 220 Mosaic the image
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
什么是RDB和AOF
Nodejs教程之Expressjs一篇文章快速入门
Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)
2017 8th Blue Bridge Cup group a provincial tournament
Leetcode hot topic Hot 100 day 32: "minimum coverage substring"
快过年了,心也懒了
Reinforcement learning - learning notes 5 | alphago
Reflection operation exercise
【微信小程序】運行機制和更新機制
Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
Pat 1085 perfect sequence (25 points) perfect sequence
Swagger UI教程 API 文档神器
Le langage r visualise les relations entre plus de deux variables de classification (catégories), crée des plots Mosaiques en utilisant la fonction Mosaic dans le paquet VCD, et visualise les relation
爱可可AI前沿推介(7.6)
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
User defined current limiting annotation