1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| const goods = require("./data/goods.json"); const ratings = require("./data/ratings.json"); const seller = require("./data/seller.json"); module.exports = { baseUrl: '/', outputDir: 'dist', assetsDir: 'assets', lintOnSave: false, devServer: { open: false, host: "localhost", port: 8081, https: false, hotOnly: false, proxy: { '/api': { target: "http://localhost:5000/api/", ws: true, changePrigin: true, pathRewrite: { '^/api': '1' } } }, before(app){ app.get("/api/goods",(req,res) => { res.json(goods); }); app.get("/api/ratings",(req,res) => { res.json(ratings); }); app.get("/api/seller",(req,res) => { res.json(seller); }); } } }
|