Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Building and running from source

Daniel edited this page Nov 4, 2015 · 5 revisions

VisualReview server is comprised of two components: a back-end server API and a HTML/CSS/Javascript front-end. The back-end is implemented in the Clojure language using Leiningen for building and dependency management. The front-end uses AngularJS with Grunt as a build tool and both NPM and Bower for dependency management. The entire project is packaged using a Leiningen task.

Front-end

Run npm install and bower install from the viewer/ directory to install dependencies. Then use grunt server to run a local server for development on port 9000. This server will only serve the front-end assets (html, css, images, javascript). Any calls to /api will be proxied to localhost:7000, which should be the actual VisualReview server. See below how to start that.

Front-end tests are created using Karma and Jasmine. To run the tests: grunt test

Back-end

In order to run the server or to create an executable jar you'll need install Leiningen, JDK 7 or higher and tools required for the front-end (see above). After installing these, you can run the following commands:

  • run the server: lein run
  • generate an executable jar: lein uberjar
  • run back-end tests: lein test
  • run back-end and front-end tests: lein test-all

To start the server from a Clojure REPL, run the (com.xebia.visualreview.core/-main) form.

For development I highly recommend using IntelliJ IDE combined with the Cursive plugin.

Clone this wiki locally