Skip to content

Commit 2f20e1e

Browse files
committed
Fix for usage of constant port 8080, because this can can problems with default webpack-dev port from metabase frontend, which is also 8080
1 parent a80088c commit 2f20e1e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ Start the server by running:
7979
node index.js
8080
```
8181

82-
The app runs by default on port 8080.
82+
The app runs by default on port 8080. If you want to run it on a different port, set the `PORT` environment variable:
83+
```sh
84+
export PORT=8081
85+
```
86+
8387

8488
Visit [http://localhost:8080/analytics](localhost:8080/analytics) and sign in with the following credentials:
8589

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ app.get("/sso/metabase", restrict, (req, res) => {
194194
res.redirect(ssoUrl);
195195
});
196196

197-
const PORT = 8080;
197+
const PORT =
198+
process.env.PORT || 8080;
198199
if (!module.parent) {
199200
app.listen(PORT);
200201
console.log(`Express started serving on port ${PORT}`);

0 commit comments

Comments
 (0)