Commit c2df307f authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 7669164d 9d35ac2d
......@@ -4,17 +4,21 @@
*/
//express模块
console.log(process.argv)
var express =require("express");
var app =express();
const path = require('path')
const { createProxyMiddleware } = require('http-proxy-middleware')
const port = 4396
const apiProxyTarget = 'http://10.0.0.25:8100'
// 用于解决刷新后404问题
var history = require('connect-history-api-fallback');
app.use('/api',createProxyMiddleware(
{
target: 'http://10.0.0.25:8100',
target: apiProxyTarget,
changeOrigin: true,
pathRewrite: { '^/api' : '' }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment