Skip to content

Commit

Permalink
Add HOST environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzBischof committed Jan 25, 2021
1 parent bad35f2 commit 437de79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require('dotenv').config({ silent: true })
const express = require('express')
const middleWarez = require('./index.js')
const port = process.env.PORT || 3000
const host = process.env.HOST || '127.0.0.1'

const app = express()

Expand All @@ -15,6 +16,6 @@ app.get('/callback', middleWarez.callback)
app.get('/success', middleWarez.success)
app.get('/', middleWarez.index)

app.listen(port, () => {
app.listen(port, host, () => {
console.log("gandalf is walkin' on port " + port)
})

0 comments on commit 437de79

Please sign in to comment.