diff --git a/.env.example b/.env.example index 3e0d362..8f6bf2e 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,2 @@ -TARGET='url del servidor local' \ No newline at end of file +TARGET='url del servidor local' +PORT='puerto de acceso' \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 073fe63..4f8c079 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,3 +30,5 @@ COPY \ index.html \ clockIn.html \ ./ + +CMD ["node", "proxy.js"] \ No newline at end of file diff --git a/proxy.js b/proxy.js index 3d3085b..30f546f 100644 --- a/proxy.js +++ b/proxy.js @@ -12,7 +12,7 @@ const apiProxy = createProxyMiddleware('/api', { app.use('/api', apiProxy); app.use('/', express.static(__dirname)); -const port = 4000; +const port = process.env.PORT; app.listen(port, () => { console.log(`Server running on port: ${port}`); });