kopia lustrzana https://github.com/badgen/badgen.net
Prefer PORT env for auto listening
rodzic
776aee8cce
commit
afa9146bc8
2
index.ts
2
index.ts
|
@ -67,7 +67,7 @@ const server = http.createServer(async (req, res) => {
|
|||
|
||||
// Auto run
|
||||
if (require.main === module) {
|
||||
server.listen(3000)
|
||||
server.listen(process.env.PORT || 3000)
|
||||
}
|
||||
|
||||
process.on('unhandledRejection', e => {
|
||||
|
|
Ładowanie…
Reference in New Issue