📅  最后修改于: 2022-03-11 15:04:24.153000             🧑  作者: Mango
// 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..