1 | # Myhero - To Be Your Dream Maker
|
2 |
|
3 | A nodejs game server, based on [NetEase/Pomelo](https://github.com/NetEase/pomelo).
|
4 |
|
5 |
|
6 | ## Installation
|
7 | You can clone myhero into local:
|
8 | ```shell
|
9 | $ git clone https://github.com/JustLua/myhero.git
|
10 | ```
|
11 |
|
12 | but we recommend you to global install myhero:
|
13 | ```shell
|
14 | $ npm install myhero -g
|
15 | ```
|
16 | Note: maybe you should use `sudo` to `npm install`
|
17 |
|
18 | ## Usage
|
19 | First of all, you should initialize a your project after install:
|
20 | ```shell
|
21 | $ myhero init <your-project-name>
|
22 | ```
|
23 | A `<your-project-name>` directory will be created after init done,
|
24 | and then you can find two important directories under `<your-project-name>`:
|
25 | one is `game-server`, another one is `web-server`.
|
26 |
|
27 | For most of developers, we just need focus on `game-server`.
|
28 |
|
29 | If your client is a H5 web, `web-server` will be used, or you can just use `web-server`
|
30 | to build your http/https server.
|
31 |
|
32 | Now, let's start game server:
|
33 | ```shell
|
34 | $ cd <your-project-name>
|
35 | $ cd game-server
|
36 | $ myhero start .
|
37 | ```
|
38 |
|
39 | and stop server just run:
|
40 | ```shell
|
41 | $ myhero stop .
|
42 | ```
|