Skip to content

Commit

Permalink
0.0.0.0 listen
Browse files Browse the repository at this point in the history
  • Loading branch information
xfenix committed Oct 17, 2023
1 parent ef12e17 commit 5131155
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions back/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ myFastifyApp.get("/api/githubrepos/", fetchGitlabRepos);
myFastifyApp.get("/rpc/redirect/", redirectSomewhere);

// and other tech things
myFastifyApp.listen(
{ port: config.APP_PORT, address: "0.0.0.0" } as any,
(err, address) => {
if (err) throw err;
myFastifyApp.log.info(`server listening on ${address}`);
}
);
myFastifyApp
.listen({ port: config.APP_PORT, host: "0.0.0.0" } as any)
.then((address) => console.log(`server listening on ${address}`))
.catch((err) => {
console.log("Error starting server:", err);
process.exit(1);
});

process.on("SIGINT", closeGracefully);
process.on("SIGTERM", closeGracefully);

0 comments on commit 5131155

Please sign in to comment.