Skip to content

Commit

Permalink
Change the default port for the development servers
Browse files Browse the repository at this point in the history
5000 is used by Control Center on macOS, so this will likely annoy
at least a few developers.

This is based on #346, so that should be reviewed and merged first.
  • Loading branch information
JulianKniephoff committed May 14, 2024
1 parent 3723456 commit d54b5fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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 a Opencast instance at http://stable.opencast.org. You can change
the url to at a different Opencast if you wish (e.g. http://localhost.8080 for
a local Opencast installation). Note that `http` is required.
Expand All @@ -65,11 +65,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:
Expand Down
2 changes: 1 addition & 1 deletion app/src/setupProxy.js
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion proxyServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion staticServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require("path");
const express = require("express");

const app = express();
const port = process.env.PORT || 5000;
const port = process.env.PORT || 5001;

app.get("/*", express.static(path.join(__dirname, "test/app/GET")));

Expand Down

0 comments on commit d54b5fa

Please sign in to comment.