nodeJS静态资源

    技术2022-07-10  165

    设置静态资源防止跨域

    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"); })
    Processed: 0.079, SQL: 9