pomelo环境搭建

时间:2023-03-08 20:17:29
pomelo环境搭建

在ubuntu上搭建pomelo环境

一 安装node.js
 
不要直接安装nodejs, 因为ubuntu上默认的nodejs版本是0.6的太老
千万不要下tar包自己安装, 问题很多
正确方法如下:  
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
(来源: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager)

二 安装pomelo
 
sudo apt-get install git
git clone https://github.com/NetEase/pomelo.git
cd pomelo
npm install pomelo -g

三 HelloWorld

pomelo init ./HelloWorld
或者使用下面的三个命令:
mkdir HelloWorld
cd HelloWorld
pomelo init
然后安装依赖
cd pomelo
sh npm-install.sh
启动服务器
cd game-server
pomelo start
cd web-server
node app
访问http://localhost:3001

(来源: https://github.com/NetEase/pomelo/wiki/pomelo%E7%9A%84HelloWorld