const express = require("express"); const app = express(); /*
-
-
app.use()
方法,是专门用来注册 中间件; -
express.static
是express的内置中间件;
-
-
语法2:
*/ //express.static(要托管的文件夹) app.use("/xxx", express.static("../https/")); app.listen(3000, () => { console.log("运行成功"); });