1,目录
2,后端
const express = require('express');
const app = express();
// Return the content of the index.html file
app.get('/', (req, res) => {
res.sendFile( __dirname+'/htmlpack'+'/index.html');
});
app.listen(3000, () => {
console.log('Server is listening on port 3000');
});
3,效果