Skip to content

Commit

Permalink
added extra instructions to README.MD
Browse files Browse the repository at this point in the history
  • Loading branch information
elmlea-young committed Oct 13, 2015
1 parent 0ac15c7 commit c1af883
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,62 +19,74 @@
"password": "",
"database": "jscity"
```
* Open nodeJs console and go to the js diretory from JSCity.
* Open nodeJs console and go to the js directory from JSCity.
```sh
cd /path-to-jscity-directory/js
```
* Start the application server using the command.
```sh
node serve.js
node server.js
```
* Use your browser access the url below to open the jscity system:
* Using your browser, access the url below to open the jscity system:
```
http://localhost:800/
http://localhost:8888/
```
* Select the system from the combobox and wait for the end of city design.

### How to generate a city

* Certifiy that you have [nodejs](https://nodejs.org/en/) and [MySQL server](https://dev.mysql.com/downloads/mysql/) installed on your computer.
* Unpack your desired project and take a note of the path to access it. For this sample let`s imagine that my desired project is placed inside the follow path:
* Unpack your desired project and take a note of the path to access it. For this sample let`s imagine that my desired project is placed inside the following path:
```
path-to-jscity-directory/js/backend/system/
```
* Make sure the generator.js file is placed inside your project directory. e.g:
```sh
path-to-jscity-directory/js/backend/system/name-of-your-project/
```
* Check the lib folder and config.json file are in your project's parent directory. e.g.:
```sh
path-to-jscity-directory/js/backend/system/
```
* There should also be a copy of config.json in the js directory:
```sh
path-to-jscity-directory/js
```
* Make sure that your MySQL server is started. If it isn`t, start the MySQL server.
* Open nodeJs console and go to the js directory from JSCity
```sh
cd /path-to-jscity-directory/js
```
* Start the application server using the command:
```sh
node serve.js
node server.js
```
* Open **another nodejs console** and go to the directory that you place your desired project.
* Open **another nodejs console** and go to the directory that you placed your desired project.
```sh
cd /path-to-jscity-directory/js/backend/system/name-of-your-project/
```
* Run the **generator.js** follow by the path of your project , a parameter -c and a name to your city. The line below shows an example of how the command is supposed to be.
* Run the **generator.js** followed by the path of your project , a parameter -c and a name to your city. The line below shows an example of how the command is supposed to be.
```sh
node generator.js path-to-project-diretory -c "Name Your Project"
```
This command reads all js file on the directory and its subdirectories and inserts all the information needed in the database to design the city. Remember to specify your project source code correct path, because some github cloned projects come with sample codes , minify libraries and other codes that don`t represent the real core of the system.
This command reads all js file in the directory and its subdirectories and inserts all the information needed in the database to design the city. Remember to specify your project source code correct path, because some github cloned projects come with sample codes , minify libraries and other codes that don`t represent the real core of the system.
```sh
node gerador.js ./backend/system/name-of-your-project/src/ -c "City Name"
node generator.js ./backend/system/name-of-your-project/src/ -c "City Name"
```
In some cases the analysed project have at the end of the file, unfinished functions that close in another file. This may be the reason of problems at the parser, causing troubles in generating data cities. In that case, you should unify the archives or use the comand bellow to ignore parser errors.
```sh
node gerador.js ./backend/system/name-of-your-project/src/ -c "City Name"
node generator.js ./backend/system/name-of-your-project/src/ -c "City Name"
```
* Wait for the end of the process.
* Use your browser access the url below to open the jscity system:
```
http://localhost:800/
http://localhost:8888/
```
* Select the system from the combobox and wait for the end of city design.

### City Controls

We`ve implemented two types of visualization controls. The defaul control is an Orbital but you can easly change to a first person control by accessing the controls menu.
We`ve implemented two types of visualization controls. The default control is an Orbital but you can easily change to a first person control by accessing the controls menu.

##### How to use the controls

Expand Down
8 changes: 4 additions & 4 deletions js/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"porta": 800,
"porta": 8888,
"debug": false,
"conexao": "local",
"cache-local": false,
Expand All @@ -13,23 +13,23 @@
"connectionLimit": 200,
"waitForConnections": true,
"host": "localhost",
"user": "root",
"user": "jscity",
"password": "",
"database": "jscity"
},
"amazon": {
"connectionLimit": 10000,
"waitForConnections": true,
"host": "localhost",
"user": "root",
"user": "jscity",
"password": "",
"database": "jscity"
},
"azure": {
"connectionLimit": 4,
"waitForConnections": true,
"host": "localhost",
"user": "root",
"user": "jscity",
"password": "",
"database": "jscity"
}
Expand Down

0 comments on commit c1af883

Please sign in to comment.