Running locally with Tomcat or NodeJS - GeoscienceAustralia/interactive-maps GitHub Wiki
The following steps were performed using IntelliJ, these can easily be replicated in another IDE.
You must have the following installed on your machine
- Java 1.6+
- Maven 3.0+ **
- NodeJS
** Optional.
Installing Dependencies
Navigate to the local directory where Interactive-Maps is cloned and run the following commands.
npm install
bower install
You should see a node_modules directory created in the root directory and bower_components
in the webapp
directory.
Running it locally
To run Interactive-Maps locally after cloning and pulling down all the required dependencies, the following instructions are for IntelliJ users.
NodeJS
To create run configurations for NodeJS using IntelliJ, you'll require the NodeJS IntelliJ plugin.
- In IntelliJ from the file menu select "Run" --> "Edit Configurations"
- Click on the green plus sign, click on Node.js
- Enter a name for your config, e.g. Node
- In the Configuration tab click on the box to select a file next to
JavaScript file:
, and selectserver.js
from the root of your interactive-maps directory - Click on the
Browser/Live Edit
tab - Select the browser you wish to use and in the text box enter
http://localhost:3000/interactive-maps/index.html#/
- Click on Apply then
OK
- Click the Play sign and the Node server will start and the application will launch in your browser
Tomcat
- In IntelliJ from the file menu select "Run" --> "Edit Configurations"
- Click on the green plus sign, click on Tomcat Server then mouse over the arrow and select Local
You should now be on theServer
tab - Enter a name for your config, e.g. Local
- Click on
Configure
, browse to your tomcat installation and clickOK
, for exampleC:\Developer\Apps\apache-tomcat-6.0.37_x86-64
- In the "before launch: Make" section click on the green plus sign then select "Build Artifacts", select "interactive-maps:war exploded"
- In the
Open Browser
textbox enterhttp://localhost:8080/interactive-maps/index.html#/
- Click on the
Deployment
tab - Click on the green plus sign and select "Artifact", select select "interactive-maps:war exploded"
- In the
Application context
enter "/interactive-maps/" - Click on Apply then
OK
- Now on the top right hand corner, you will see your config name appear with a Play sign next to it
- Click the Play sign and the Tomcat will start and the application will launch in your browser