Home  >  Article  >  Web Front-end  >  Build pomelo development environment_node.js

Build pomelo development environment_node.js

WBOY
WBOYOriginal
2016-05-16 16:43:091365browse

Development prerequisites:

Windows system, please make sure your Windows system contains source code compilation tools. The source code of Node.js is mainly composed of C code and JavaScript code, but the gyp tool is used for source code project management, which is written in Python language. On the Windows platform, Node.js uses gyp to generate Visual Studio Solution files, which are eventually compiled into binary files through the VC compiler. Therefore, please make sure your Windows system meets the following two conditions before installation:

* Python (2.5

* VC Compiler, included in Visual Studio 2010 (VC 2010 Express is also available)

node version 0.8.22

pomelo version 0.3.5

1: Install pomelo

npm install -g pomelo

2: Try pomelo installation to see if it is ok

pomelo --help 

3: Start development

pomelo init pomelo_demo

This will create a basic pomelo development environment, including game-server and web-server folders

4: The next step is to install node modules Directly under the project directory, type

npm-install.bat 

The installation is complete

5: Then enter the game-server directory

Type

pomelo start 

You can complete the startup of the server code

6: Then enter the web-server directory

Install the components client library first (make sure component is installed before installation, use npm install -g component to install)

Type

bin\component.bat 

Then in the web-server directory

node app

Follow the prompts and you can view the effect on the browser

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn