Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,18 @@ After installation, you can run the Sequence Tube Map:
npm run serve
```
Note that this is using **npm**, not **nvm** as in the previous step.

If you get an `EADDRINUSE` error, try picking a different server port (and update all the numbers below from 3000 to whatever you picked).
```
SERVER_PORT=3001 npm run serve
```
5. Open the Sequence Tube Map in your browser.
- If you are running the Sequence Tube Map on your local computer, you can visit [http://localhost:3001](http://localhost:3001).
- 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 yourname@bigserver.example.edu`, 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:
- If you are running the Sequence Tube Map on your local computer, you can visit [http://localhost:3000](http://localhost:3000).
- 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 yourname@bigserver.example.edu`, 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:
```
ssh -L 3001:localhost:3001 yourname@bigserver.example.edu
ssh -L 3000:localhost:3000 yourname@bigserver.example.edu
```
While that SSH connection is open, you will be able to see the Sequence Tube Map at [http://localhost:3001](http://localhost:3001).
While that SSH connection is open, you will be able to see the Sequence Tube Map at [http://localhost:3000](http://localhost:3000).

### Setting Up a Visualization

Expand Down
2 changes: 1 addition & 1 deletion doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `npm run build`/`npm run serve` pipeline can only produce minified code, whi
```
npm run start
```
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.
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.

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

Expand Down
2 changes: 1 addition & 1 deletion src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = function (app) {
"http://" +
addressToHost(config.serverBindAddress) +
":" +
(process.env.SERVER_PORT || "3000");
(process.env.SERVER_PORT || config.serverPort || "3000");
app.use(createProxyMiddleware(serverBase + "/api"));
// Websockets don't seem to get through unless we ask for them explicitly.
// They can just go to the root because the server ignores websocket paths.
Expand Down