✨ 客户端脚本支持自定义端口
This commit is contained in:
parent
09e2c39132
commit
d54b682f7a
@ -7,7 +7,7 @@ const httpServer = () => {
|
||||
const app = new Koa()
|
||||
const server = http.createServer(app.callback())
|
||||
serverHandler(app, server)
|
||||
const port = process.env.CLIENT_PORT || defaultPort
|
||||
const port = process.env.clientPort || defaultPort
|
||||
server.listen(port, () => {
|
||||
console.log(`Server(http) is running on port:${ port }`)
|
||||
})
|
||||
|
@ -1,10 +1,10 @@
|
||||
[Unit]
|
||||
Description=easynode client server port_${clientPort}
|
||||
Description=easynode client server
|
||||
|
||||
[Service]
|
||||
Environment="clientPort=22022"
|
||||
ExecStart=/root/local/easynode-client/easynode-client
|
||||
WorkingDirectory=/root/local/easynode-client
|
||||
Environment="clientPort=${clientPort}"
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user