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 16, 2024
1 parent ae88eeb commit b4b645d
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 @@ -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.

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

0 comments on commit b4b645d

Please sign in to comment.