Pomelo
Document:
Https://github.com/NetEase/pomelo/wiki
Https://github.com/NetEase/pomelo/wiki/Home-in-Chinese
Pomelo installation
Document:
Https://github.com/joyent/node/wiki/Installation
Https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
Steps:
L Mounting Nodejs
# CURL-SL Https://deb.nodesource.com/setup | Bash-
# Apt-get Install-y Nodejs
L Check if Nodejs is installed successfully
$ node–v
L Mounting Pomelo
Method 1: Use the NPM (Node Package management tool) to install the pomelo globally
$ NPM Install Pomelo–g
Method 2: Download the source code installation
$ git clone https://github.com/NetEase/pomelo.git
$ CD Pomelo
$ NPM Install-g
Note:
NPM Documentation
https://docs.npmjs.com/
Installation issues
When installing pomelo, prompt
Gyp WARN eacces User "root" does not has permission to access the dev dir "/root/.node-gyp/0.10.28"
Gyp WARN eacces Attempting to reinstall using temporary dev dir "/root/.nvm/v0.10.28/lib/node_modules/pomelo/node_ Modules/pomelo-rpc/node_modules/toobusy/.node-gyp "
Command for NPM install pomelo-g--unsafe-perm to succeed
When running to Gyp http GET http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz, the entire installation process is a bit long and you need to wait patiently
Pomelo Project
Pomelo command-line tools:
Https://github.com/NetEase/pomelo/wiki/pomelo%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8
L Create a project
$ pomelo init./projectname
Installing dependent Packages
$ CD ProjectName
$ sh npm-install.sh
L Start Game-server
$ CD Game-server
$ pomelo Start
L Start Web-server
$ CD Web-server
$ node App
L Test
Launch Browser, Address:
http://hostip:3001/
L Modify Server IP
$ vim web-server/public/index.html
Var host = "127.0.0.1" modified to server Game-server IP address
Linux under pomelo environment configuration