完成中转仓管理
This commit is contained in:
16
datav/api/server.js
Normal file
16
datav/api/server.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const express = require('express');
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
const path = require('path');
|
||||
|
||||
const app = express();
|
||||
const PORT = 8080;
|
||||
|
||||
app.use('/api', createProxyMiddleware({
|
||||
target: 'https://cattletrack.aiotagro.com',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
}));
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'datav')));
|
||||
|
||||
app.listen(PORT, () => console.log(`http://127.0.0.1:8081`));
|
||||
Reference in New Issue
Block a user