This commit is contained in:
赵鑫 2022-09-04 16:29:49 +08:00
parent d90c53b706
commit c5c2d28b19

View File

@ -38,4 +38,5 @@ const server = http.createServer(function (request, response) {
} }
}) })
const port = process.env.PORT || 3000 const port = process.env.PORT || 3000
server.listen(port, () => console.log(`rpi status http server running at http://localhost:${port}`)) const host = process.env.HOST || 'localhost'
server.listen(port, host, () => console.log(`rpi status http server running at http://${host}:${port}`))