Merge pull request 'refactor: refs #6656 set proxy for test environment' (#15) from 6656-fixProxy into test
gitea/worker-time-control/pipeline/head This commit looks good
Details
gitea/worker-time-control/pipeline/head This commit looks good
Details
Reviewed-on: #15
This commit is contained in:
commit
d27fc98b8b
|
@ -1 +1,2 @@
|
||||||
TARGET='url del servidor local'
|
TARGET='url del servidor local'
|
||||||
|
PORT='puerto de acceso'
|
|
@ -30,3 +30,5 @@ COPY \
|
||||||
index.html \
|
index.html \
|
||||||
clockIn.html \
|
clockIn.html \
|
||||||
./
|
./
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
File diff suppressed because it is too large
Load Diff
|
@ -16,13 +16,11 @@
|
||||||
"npm": ">=8"
|
"npm": ">=8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"express": "^4.18.2",
|
||||||
|
"http-proxy-middleware": "^2.0.6",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"fastclick": "^1.0.6",
|
"fastclick": "^1.0.6",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
"sweetalert2": "11.10.1"
|
"sweetalert2": "11.10.1"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"express": "^4.18.2",
|
|
||||||
"http-proxy-middleware": "^2.0.6"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
proxy.js
2
proxy.js
|
@ -12,7 +12,7 @@ const apiProxy = createProxyMiddleware('/api', {
|
||||||
app.use('/api', apiProxy);
|
app.use('/api', apiProxy);
|
||||||
app.use('/', express.static(__dirname));
|
app.use('/', express.static(__dirname));
|
||||||
|
|
||||||
const port = 4000;
|
const port = process.env.PORT;
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`Server running on port: ${port}`);
|
console.log(`Server running on port: ${port}`);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue