refactor: refs #6656 set proxy for test environment
gitea/worker-time-control/pipeline/head This commit looks good Details

This commit is contained in:
jorgep 2024-01-09 09:11:46 +01:00
parent 8fb70a4c85
commit 51bc44bec3
3 changed files with 5 additions and 2 deletions

View File

@ -1 +1,2 @@
TARGET='url del servidor local' TARGET='url del servidor local'
PORT='puerto de acceso'

View File

@ -30,3 +30,5 @@ COPY \
index.html \ index.html \
clockIn.html \ clockIn.html \
./ ./
CMD ["node", "proxy.js"]

View File

@ -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}`);
}); });