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.

  1. In IntelliJ from the file menu select "Run" --> "Edit Configurations"
  2. Click on the green plus sign, click on Node.js
  3. Enter a name for your config, e.g. Node
  4. In the Configuration tab click on the box to select a file next to JavaScript file:, and select server.js from the root of your interactive-maps directory
  5. Click on the Browser/Live Edit tab
  6. Select the browser you wish to use and in the text box enter http://localhost:3000/interactive-maps/index.html#/
  7. Click on Apply then OK
  8. Click the Play sign and the Node server will start and the application will launch in your browser

Tomcat

  1. In IntelliJ from the file menu select "Run" --> "Edit Configurations"
  2. Click on the green plus sign, click on Tomcat Server then mouse over the arrow and select Local
    You should now be on the Server tab
  3. Enter a name for your config, e.g. Local
  4. Click on Configure, browse to your tomcat installation and click OK, for example C:\Developer\Apps\apache-tomcat-6.0.37_x86-64
  5. In the "before launch: Make" section click on the green plus sign then select "Build Artifacts", select "interactive-maps:war exploded"
  6. In the Open Browser textbox enter http://localhost:8080/interactive-maps/index.html#/
  7. Click on the Deployment tab
  8. Click on the green plus sign and select "Artifact", select select "interactive-maps:war exploded"
  9. In the Application context enter "/interactive-maps/"
  10. Click on Apply then OK
  11. Now on the top right hand corner, you will see your config name appear with a Play sign next to it
  12. Click the Play sign and the Tomcat will start and the application will launch in your browser