const express = require('express');
const port = process.env.PORT || 3000;
const app = express();
const path=require('path');
app.use(express.static(__dirname+'../dist'));
标题
app.get('*',function(req,res){
res.sendFile(path.join(__dirname,'src','index.html'));
});
app.listen(port);