阿里雲ECS伺服器部署Dart服務端程式
阿新 • • 發佈:2018-11-29
pub global activate [package]
Instead of this:
export PATH="$PATH":"~/.pub-cache/bin"
It should be
export PATH="$PATH:$HOME/.pub-cache/bin"
1.Dart服務端繫結域名為ECS的內部IP:172.31.213.9(自己的伺服器內網IP)
io.serve(handler, '172.31.213.9', 80).then((server) { print('Serving at http://${server.address.host}:${server.port}'); });
2.安全組策略開啟80/TCP埠。
3.檢視執行緒 $ ps -ef
4.殺死執行緒 $ kill -s 9 1827
其中-s 9 制定了傳遞給程序的訊號是9,即強制、儘快終止程序。各個終止訊號及其作用見附錄。
1827則是上面ps查到的Dart服務的PID。