Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在后台运行 Go 服务器的最简单方法是什么?我目前让服务器在 CMD 中运行,并且不想更改实际代码。
我会用屏幕。假设 Ubuntu 18.04:
sudo apt-get install screen
然后
screen
go run main.go
使用 Ctrl + A + D 离开屏幕。回到它:
screen -r