const express = require(‘express’);
const path = require(‘path’);
const app = express();
app.use(express.static(path.join(__dirname, ‘build’)));
app.get(’*’, function(req, res) {
res.sendFile(path.join(__dirname, ‘build’, ‘index.html’));
});
app.listen(9000);
简易的搭建一个可以运行build的文件
最新推荐文章于 2021-10-09 13:38:14 发布