Skip to content

Commit

Permalink
Update index.js (#37)
Browse files Browse the repository at this point in the history
* Update index.js

Fixed errors on port binding.

* Update src/server/index.js

Co-Authored-By: ernestpascual <eepascual@gmail.com>
  • Loading branch information
ernestpascual authored and crsandeep committed Jan 29, 2019
1 parent 7d40c70 commit 87fe464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ const app = express();

app.use(express.static('dist'));
app.get('/api/getUsername', (req, res) => res.send({ username: os.userInfo().username }));
app.listen(8080, () => console.log('Listening on port 8080!'));

app.listen(process.env.PORT || 8080, () => console.log(`Listening on port ${process.env.PORT || 8080}!`));

0 comments on commit 87fe464

Please sign in to comment.