Pomele related
Official website: http://pomelo.netease.com/
Pomelo club:http://nodejs.netease.com/
Pomelo Introduction: Introduction and Installation
Pomelo Helloworld:hello World Example
Pomelo Chat:github Demo
1. Clone the project from GitHub and switch to the corresponding branch
git clone https://github.com/netease/chatofpomelo-websocket.gitgit checkout tutorial-starter
2. Create a new Pomelo project
mkdir CHAT_DEMOCD Chat_demopomelo Init
Npm-install.bat
3. Created here is just an empty project, you can start the server and the client to test the success of the creation
CD Chat_demo // Service Side CD Game_serverpomelo start // Client CD Web_servernode app
To access http://127.0.0.1:3001 through a browser, click Test Game Server and a prompt will normally appear.
4. Copy all files under Clone project Game_server and Web_server to Game_server and Web_server of the Chat_demo project, respectively
5. Start the service
CD Chat_demo // Service Side CD Game_serverpomelo StartCD. // Client CD Web_servernode app
Note: It is possible to start the server "xxxx" "XXX" Register Master failed error, which will be said after the workaround.
6. Access http://127.0.0.1:3001/index.html, the login screen will appear, enter the name and channel as required to enter the chat interface, as
server "xxxx" "XXX" Register Master failed problem resolution
Reason:
Chat Service end is divided into three parts connector, chat, gate, in a distributed deployment environment, these three types of servers to communicate, each server will hold a token as a validation string, In the config directory, Adminserver.json is adding tokens for each type of server, and only connector is created by default, which is why "chat" and "gate" registrations fail and "connector" The reason for the success of the registration, it is easy to know the reason for resolution.
Workaround:
In the config directory , add the Adminserver.json of chat and gate two server types, such as
Pomelo Learning-chat Chat Example [Server "Gate-server-1" "Gate" Register Master failed] Error resolution