Swoole and Workerman They can all realize the function of instant communication, here I simply workman as Windows Server boot as an example to say ha. Go straight to the chase:
Download this chat room item
Workerman Chat Room Http://www.workerman.net/workerman-chat
Click Start_for_win.bat will appear a black window in the browser to browse http://127.0.0.1:55151 can see the chat room page! But when we close the Black window we will find out when we browse Port 55151! When the project is really deployed I think this is very insecure, so we have to find a way to implement the daemon, the bat file as a Windows service to run, below we use NSSM, with NSSM to turn bat into a service
First download NSSM software, this on Baidu directly search a can!
After downloading is a compressed package to find the corresponding 32/64-bit NSSM of your own system (find the path in the cmd window NSSM) Execute NSSM Install < service name > Example: NSSM install Workerman (custom service name)
Then enter the NSSM configuration interface to fill in your project's bat file address in the interface, for example:
Click Install Service, for example:
NOTE: 360 will intercept the service and ignore it directly.
When the successfully is displayed, the service has been installed successfully! We can click on my Computer-"management-" service to see if there is a service, I can already see the service named Workerman:
To launch an app using NSSM to deploy Windows services