16 lines
539 B
Plaintext
16 lines
539 B
Plaintext
服务启动命令(端口 :8000)
|
||
================================
|
||
|
||
1. 杀死旧进程(占用 8000 端口):
|
||
|
||
netstat -ano | findstr ":8000" | findstr LISTENING
|
||
taskkill /F /PID <上面查到的PID>
|
||
|
||
2. 重新编译并启动:
|
||
|
||
go build -o bin/admin-server.exe main.go && ./bin/admin-server.exe
|
||
|
||
或一步重启(bash):
|
||
|
||
PID=$(netstat -ano | grep ':8000' | grep LISTENING | awk '{print $NF}' | head -1); [ -n "$PID" ] && taskkill //F //PID $PID; go build -o bin/admin-server.exe main.go && ./bin/admin-server.exe
|