Deploying Neon

Eric edited this page Mar 23, 2018 · 5 revisions

Deploying Neon to Tomcat

The neon.war file can be deployed in a web server. The easiest, and recommended, deployment method is to download the war file from neonframework.org and run Neon in a Tomcat server. Alternatively, one can build and deploy the war to a local Tomcat server.

Additional instructions are included for running Neon inside of an embedded Jetty server, which is ideal for development environments.

Note that Neon is configured by default to use CORS (Cross-Origin Resource Sharing)
to allow easy communication with servers running on other ports/hosts.

Download and Deploy

  • The latest Neon war file can be conveniently downloaded at neonframework.org.
  • Once downloaded, the war can be copied to the Tomcat webapps folder to deploy.

Build and Deploy

Use the following steps to deploy Neon to a Tomcat server.

Note: These instructions assume that your system has Tomcat installed. If you do not have Tomcat installed, read the "Tomcat" section under Neon's External Dependencies in the Build Instructions.

Note: We also assume that you have completed the steps found in Neon's Initial Setup, which provides instructions for creating and configuring the gradle.properties file.

  1. In the gradle.properties file, set the NEON_SERVER property to the location of the Tomcat server. See the gradle.properties.sample for an example.

  2. Then, open a terminal and run the following command from your neon folder:

    ./gradlew war

  3. Copy the Neon war file to your Tomcat webapps directory. Depending on your installation, you may need admin or sudo access to the Tomcat folders:

    cp ./neon-server/build/libs/neon-1.1.0-SNAPSHOT.war [tomcat root]/webapps

  4. If your Tomcat server is not running, start it by running the bin/startup.sh file or using the appropriate service calls.

The Neon library is now available at http://<tomcat-server>/neon/js/neon.js, where <tomcat-server> is the location set in your Tomcat instance.

Running Neon in Jetty

You can also run the Neon framework directly from the source tree using an embedded Jetty server. The Jetty server is available through Gradle. Run Neon in Jetty by executing the following command:

    ./gradlew jettyRun

Neon will be available at http://localhost:8080/neon/js/neon.js and the examples are available at http://localhost:8080/neon/examples.

When running Neon using Jetty, the Jetty server does not need to be restarted when source code changes are made. However, when you modify groovy code, you will need to recompile the code with the command, groovy compileGroovy, for Jetty to reload the changes.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.