Skip to content

Commit 7c2bedc

Browse files
committed
changed env var name, added readme note
1 parent 6ee7d43 commit 7c2bedc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ See instructions for preferred server linux-dash server _(all included)_:
7575
npm install --production
7676

7777
## start linux-dash (on port 80 by default; may require sudo)
78+
## You may change this with the `LINUX_DASH_SERVER_PORT` environment variable (eg. `LINUX_DASH_SERVER_PORT=8080 node server`)
7879
node index.js
7980

8081
```

app/server/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ var path = require('path')
55
var spawn = require('child_process').spawn
66
var fs = require('fs')
77
var ws = require('websocket').server
8+
var port = process.env.LINUX_DASH_SERVER_PORT || 80
89

9-
server.listen(process.env.PORT || 80)
10-
console.log('Linux Dash Server Started!')
10+
server.listen(port, function() {
11+
console.log('Linux Dash Server Started on port ' + port + '!');
12+
})
1113

1214
app.use(express.static(path.resolve(__dirname + '/../')))
1315

0 commit comments

Comments
 (0)