Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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.
- For Help deploying a war file to a Tomcat server, refer to the Tomcat webapp how-to guide.
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.
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.
Then, open a terminal and run the following command from your neon folder:
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
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:
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.