mirror of https://codeberg.org/pzp/pzp-hub.git
support specifying ports as env vars
This commit is contained in:
parent
e6bf56282d
commit
04a13fbe4b
|
@ -29,10 +29,13 @@ app.get('/invite', (req, reply) => {
|
||||||
reply.view('invite.ejs')
|
reply.view('invite.ejs')
|
||||||
})
|
})
|
||||||
|
|
||||||
app.listen({ port: 3000 }, (err, address) => {
|
app.listen(
|
||||||
|
{ host: '0.0.0.0', port: process.env.HTTP_PORT ?? 3000 },
|
||||||
|
(err, address) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
app.log.error(err)
|
app.log.error(err)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
startPeer()
|
startPeer()
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
@ -25,7 +25,12 @@ module.exports = function startPeer() {
|
||||||
connections: {
|
connections: {
|
||||||
incoming: {
|
incoming: {
|
||||||
net: [
|
net: [
|
||||||
{ scope: 'public', transform: 'shse', port: 8008, host: '0.0.0.0' },
|
{
|
||||||
|
scope: 'public',
|
||||||
|
transform: 'shse',
|
||||||
|
port: process.env.PPPPP_PORT ?? 8008,
|
||||||
|
host: '0.0.0.0',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
outgoing: {
|
outgoing: {
|
||||||
|
|
Loading…
Reference in New Issue