johanley / astro

Full source for astronomytonight.net, a site for amateur astronomers. The site has basic astronomy data for any location, and weather data for specific countries (the US and Canada). Customizable for your observing location.
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

astro

Full source for astronomytonight.net, a site for amateur astronomers. The site has basic astronomy data for any location, and weather data for specific countries (the US and Canada). Customizable for your observing location.

The layout of the source tree matches the runtime layout of the web site.

The code is roughly 95% javascript, and 5% Java. No relational database is used. The site is implemented as a .war file (servlets), running on Tomcat. Courtesy binaries of the Java classes are checked into source, for those who don't care about changing the Java code.

Running locally

In order to run the app, you will need a Java Runtime Environment (JRE), and Tomcat (or a similar servlet container). In order to compile new versions of the Java code, you will need a Java Development Kit (JDK).

In prod, the version of Tomcat is version 6, running on JRE 1.7. (That's a bit stale.)

To run the app locally on Tomcat:

After you've installed Tomcat, the last step is to point Tomcat to the root of the project tree for astronomytonight.net that you downloaded from github. You do that by creating a file in this location

This astro.xml file (called a context file) simply contains a pointer to the root of the project tree. An example (which you will need to modify, of course):

Finally, there is a silly change you need to make to js\util.js. There's a reference to port 8081, which you will likely need to change to port 8080 (Tomcat's default port), or to whatever port you're running Tomcat on.

The name of the astro.xml file controls the URL under which you'll see the app running:

Other items to note: