Answer the question
In order to leave comments, you need to log in
Is it possible to somehow achieve the inclusion / stop / restart of the golang server through the console?
Yuzayu Gin. When the server starts, but now you can turn it off only through Ctr + c. Plus, when it's enabled, the terminal is essentially locked. Well, that is, I can open the second one, but I'm not used to this at all.
Is this normal? This is not how it will not affect the placement of the project?
The same example of shutting down the server in the Gin dock .
But this is very cluttered, and it only works through code. go run main.go
Answer the question
In order to leave comments, you need to log in
The question is not entirely clear. Why don't you actually like Ctr+c Shutdown from the docks? If you want the server not to block the console just like that and start it
$ myserver &
with this application, you can
domain.com/admin/shutdown
myserver --quit
that will communicate with an already running instance via net / rpc or unix pipe or unix socket or the same http and call the extinguishing procedureDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question