Home > Article > Backend Development > swoole starts multiple servers with one click
I use swoole_http_server as the http server in my project,
I use swoole_server as the database connection pool for mysql, redis and other databases. In addition, I plan to use swoole_server to build an rpc server in the future. I have to start these two servers manually every time during development. , very inconvenient
Question:
Is there a way to start these servers with one click?
ps: I know that when the server is in the daemonize state, it is possible to write a shell command. If the server is not in the daemonize state, I don’t know if there is a better way.
I used swoole_process to open two sub-processes to start these servers, but the process was easy to freeze. Some functions (including restart, reload, stop server) were very cumbersome to implement, and there were many bugs, so I finally gave up.
============
ps: Problem has been solved