设置静态资源防止跨域
const express
= require("express");
const path
= require("path");
const app
= express();
app
.use(express
.static(path
.resolve(__dirname
,"../xxx")));
app
.listen(80,function(){
console
.log("success");
})
转载请注明原文地址:https://ipadbbs.8miu.com/read-354.html