ryanjdew / NoN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

Assuming you just cloned this repository, here's how to deploy and run the application.

Prerequisites:

  1. Download, install and run the latest version of MarkLogic 9.
  2. A Java Development Kit (JDK) 1.7+ or 1.8+ (needed to compile a small amount of Java code in the Spring Boot app, as well as run the Spring Boot app)
  3. Node 4.x+
  4. Gulp
  5. Git (required by Bower)
  6. (Optional) Gradle

Note that if you have Gradle installed locally already, you can run "gradle" instead of "./gradlew". If you don't, then the first time you run "./gradlew", Gradle will be downloaded, which may take a minute or so.

Check the following file to ensure the and values are available on your local host:

	./src/main/resources/application.properties

Deploy the MarkLogic portion of the application to MarkLogic (the "-i" is for info-level logging in Gradle, and it's useful to see what's being deployed, but it's not required). Note that in the future, when your MarkLogic config changes, you usually only need to run the task that corresponds to the modified resources. Run "./gradlew tasks" to see all those tasks. It's rare that you'll need to run a full "mlDeploy" again in the future.

./gradlew -i mlDeploy

Fire up Spring Boot, which runs an embedded Tomcat server:

./gradlew bootRun

Zipcodes

	Output collection: zipcodes
	Document Type: xml
	file: /data/zipcode.csv

What should I run while developing?

This is a 3 tier architecture - Angular, Spring Boot, and MarkLogic - and thus, during development, there are 3 things you'll want to update and test, ideally without having to run a build task manually. Here's the best way to do that:

  1. In one terminal window, run "gulp watch" to process changes under src/main/webapp.
  2. In another terminal window, run "gradle bootRun". This will not only run Spring Boot, but a component in the webapp will automatically load new/modified MarkLogic modules, just like "gradle mlWatch".

You can also run the middle tier via an IDE like IntelliJ or Eclipse - just run the "App" program.

About


Languages

Language:JavaScript 57.9%Language:HTML 22.9%Language:XQuery 10.7%Language:CSS 6.8%Language:Java 1.5%Language:XSLT 0.1%