Home  >  Article  >  Backend Development  >  swoole starts multiple servers with one click

swoole starts multiple servers with one click

WBOY
WBOYOriginal
2016-09-25 09:23:051396browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn