Skip to content

Commit

Permalink
update server host and port bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
shiling committed Jul 26, 2023
1 parent 718c903 commit c7794b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ fastify.post('/api/pokedex/:id/delete', async function handler (request, reply)
// Run the server
//-----------------------------------------------------
try {
await fastify.listen({ port: (process.env["$PORT"] || process.env.PORT || 3000) })
await fastify.listen({
host: (process.env.HOST || "0.0.0.0"),
port: (process.env["$PORT"] || process.env.PORT || 3000)
})
} catch (err) {
fastify.log.error(err)
process.exit(1)
Expand Down

0 comments on commit c7794b8

Please sign in to comment.