diff --git a/README.md b/README.md index 28682a6d5f..1cd8b01523 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ To test with real data run: npm run proxy-server http://stable.opencast.org *opencast_digest_username* *opencast_digest_password* ``` -This will start a proxy server at localhost:5000. It will automatically proxy +This will start a proxy server at localhost:5001. It will automatically proxy requests to an Opencast instance at http://stable.opencast.org. You can change the URL to a different Opencast if you wish (e.g., http://localhost.8080 for a local Opencast installation). Note that `http` is required. @@ -70,11 +70,11 @@ not work when using this mode. ### Alternative ports The static file server and the proxy server serve their content -on the port 5000. If this is used already (as it is on macOS) +on the port 5001. If this is used already (as it is on macOS) you can specify an alternative port in the `PORT` environment variable, for example: - PORT=5001 npm run proxy-server ... + PORT=5002 npm run proxy-server ... Note that you need to specify the same port when running the client, this time in the `PROXY_PORT` variable: diff --git a/app/src/setupProxy.js b/app/src/setupProxy.js index 693d5a3cb8..25fa6b1697 100644 --- a/app/src/setupProxy.js +++ b/app/src/setupProxy.js @@ -1,6 +1,6 @@ const { createProxyMiddleware } = require("http-proxy-middleware"); -const port = process.env.PROXY_PORT || 5000; +const port = process.env.PROXY_PORT || 5001; module.exports = function (app) { app.use( diff --git a/proxyServer.js b/proxyServer.js index a3acf925b6..0dd50056f7 100644 --- a/proxyServer.js +++ b/proxyServer.js @@ -4,7 +4,7 @@ const requestDigest = require('request-digest'); const urlParser = require('url-parse'); const app = express(); -const port = process.env.PORT || 5000; +const port = process.env.PORT || 5001; // Get values of proxy host, username and password from npm command let args = process.argv, diff --git a/staticServer.js b/staticServer.js index 59dcafc16b..3a4a6f1d5c 100644 --- a/staticServer.js +++ b/staticServer.js @@ -23,5 +23,5 @@ app.use("/", [ express.static(path.join(__dirname, "test/app")) ]); -const port = process.env.PORT || 5000; +const port = process.env.PORT || 5001; app.listen(port, () => console.log(`Listing on port ${port}`));