Skip to content

Commit 7fed8c0

Browse files
authored
Merge pull request #479 from vgteam/server-port-docs
Revise server port docs
2 parents 1bb2a57 + c99d0be commit 7fed8c0

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,18 @@ After installation, you can run the Sequence Tube Map:
9393
npm run serve
9494
```
9595
Note that this is using **npm**, not **nvm** as in the previous step.
96+
97+
If you get an `EADDRINUSE` error, try picking a different server port (and update all the numbers below from 3000 to whatever you picked).
98+
```
99+
SERVER_PORT=3001 npm run serve
100+
```
96101
5. Open the Sequence Tube Map in your browser.
97-
- If you are running the Sequence Tube Map on your local computer, you can visit [http://localhost:3001](http://localhost:3001).
98-
- If you are running the Sequence Tube Map on a *different* computer (for example, one accessed by SSH), you will need to connect to it there. You can try browsing to port 3001 on that machine's hostname. For example, if you connected with `ssh [email protected]`, then `bigserver.example.edu` is the hostname, and you want to visit `http://bigserver.example.edu:3001`. If that doesn't work, you can try setting up an SSH tunnel by making a second SSH connection with:
102+
- If you are running the Sequence Tube Map on your local computer, you can visit [http://localhost:3000](http://localhost:3000).
103+
- If you are running the Sequence Tube Map on a *different* computer (for example, one accessed by SSH), you will need to connect to it there. You can try browsing to port 3000 on that machine's hostname. For example, if you connected with `ssh [email protected]`, then `bigserver.example.edu` is the hostname, and you want to visit `http://bigserver.example.edu:3000`. If that doesn't work, you can try setting up an SSH tunnel by making a second SSH connection with:
99104
```
100-
ssh -L 3001:localhost:3001 [email protected]
105+
ssh -L 3000:localhost:3000 [email protected]
101106
```
102-
While that SSH connection is open, you will be able to see the Sequence Tube Map at [http://localhost:3001](http://localhost:3001).
107+
While that SSH connection is open, you will be able to see the Sequence Tube Map at [http://localhost:3000](http://localhost:3000).
103108
104109
### Setting Up a Visualization
105110

doc/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `npm run build`/`npm run serve` pipeline can only produce minified code, whi
1212
```
1313
npm run start
1414
```
15-
This will use React's development mode server to serve the frontend, and run the backend in a separate process, behind React's proxy. Local ports 3000 (or set a different SERVER_PORT in .env) and 3001 must both be free.
15+
This will use React's development mode server to serve the frontend, and run the backend in a separate process, behind React's proxy. Local ports 3000 and 3001 must both be free. You can change these with the `SERVER_PORT` environment variable or `.env` setting, or the `serverPort` field in `config.json`, and the `PORT` environment variable.
1616

1717
Running in this mode allows the application to produce human-readable stack traces when something goes wrong in the browser.
1818

src/setupProxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = function (app) {
2323
"http://" +
2424
addressToHost(config.serverBindAddress) +
2525
":" +
26-
(process.env.SERVER_PORT || "3000");
26+
(process.env.SERVER_PORT || config.serverPort || "3000");
2727
app.use(createProxyMiddleware(serverBase + "/api"));
2828
// Websockets don't seem to get through unless we ask for them explicitly.
2929
// They can just go to the root because the server ignores websocket paths.

0 commit comments

Comments
 (0)