📌  相关文章
📜  如何快速服务公用文件夹 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:24.153000             🧑  作者: Mango

代码示例1
// projectDirectory/src/index.js
const path = require('path')
const publicDirectoryPath = path.join(__dirname, '../public')
app.use(express.static(publicDirectoryPath))

// projectDirectory/public -> create index.html
// localhost:3000/index.html -> Here you go..