Development prerequisites:
For Windows, make sure that your Windows system contains the source code compilation tool. The Node. js source code mainly consists of C ++ code and JavaScript code, but it uses the gyp tool for source code project management. This tool is written in Python. On the Windows platform, Node. js uses gyp to generate the Visual Studio Solution file, and finally compiles it into a binary file through the VC ++ compiler. Therefore, make sure that your Windows system meets the following conditions before installation:
* Python (2.5 <version <3.0 ).
* VC ++ compiler, included in Visual Studio 2010 (VC ++ 2010 Express is also supported)
Node version 0.8.22
Pomelo version 0.3.5
1: Install pomelo
npm install -g pomelo
2: Check whether pomelo installation is OK.
pomelo --help
3: Start Development
pomelo init pomelo_demo
This will create a basic pomelo development environment, including the game-server and web-server folders.
4: Install node modulesDirectly under the project directory, Type
npm-install.bat
You can complete the installation.
5: Enter game-serverDirectory
Input
pomelo start
The server code can be started.
6: Go to the web-server Directory.
Install the components client library first (ensure that component is installed before installation, and use npm install-g component for installation)
Input
bin\component.bat
Then, under the web-server Directory
Node app
As prompted, you can view the effect in the browser.