Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Commit

Permalink
chore: add port env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Subtixx committed Apr 27, 2023
1 parent c7a008d commit 3883166
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ function createServer() {
});
});

server.listen(8080);
console.log("Server is listening on port 8080");
let port = process.env.PORT || 3000;
server.listen(port);
console.log(`Server running at ${port}`);
}

createServer();

0 comments on commit 3883166

Please sign in to comment.