Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

DIVAServices Spotlight

Unified repository for both, dummy rest server and client components for the DIVAServices Spotlight project


  1. Checkout the repository
  2. Install the mandatory dependencies: * mongoDB and start mongo daemon * Node.js and update npm * GraphicsMagick
Following packages must be installed globally. If you use `install` script, you can omit this and all the following sections from *Install*.

* [CoffeeScript]( ``npm install -g coffee-script``
* [Brunch]( ``npm install -g brunch``
* [Bower]( ``npm install -g bower``
* [Node Foreman]( ``npm install -g  foreman``
* [forever]( ``npm install -g forever``
  1. Change to the rest directory and let NPM install the necessary libraries:
$ cd rest
$ npm install
  1. Change to the web directory and install the required Node.JS modules:
$ cd web
$ npm install
$ bower install
  1. Change to the test directory and install the required Node.js modules:
$ cd test
$ npm install
  1. Create the folder logs under /web/
  2. Add dummy backend host to hosts collection in dia_dev and dia_test database
$ mongo
> use dia_dev
> db.hosts.insert({"host": "Dummy Backend Host", "url": "http://localhost:8081"})
> use dia_test
> db.hosts.insert({"host": "Dummy Backend Host": "url": "http://localhost:8081"})
  1. Configure mongo-express if you intend to use it. (Per default it is disabled. To enable it, uncomment line 6 in
Assuming you are in the root folder
$ cd web/node_modules/mongo-express
$ cp config.default.js config.js
Then change the port on line 46 to ``8083``. If you have any authentication settings on your mongoDB, please configure the ``config.js`` file according to it.


The DIVAServices Spotlight application can be started within three environments.

  1. Developing mode
$ export NODE_ENV=dev && nf -j start
# or
$ nf -j -e etc/dev.env start

This configuration is recommended if you want to develop. 2. Testing mode

$ export NODE_ENV=test && nf -j start
# or
$ nf -j -e etc/test.env start

This configuration is mandatory for running the tests. 3. Production mode

# Build static files for production
$ cd web && rm -r public && brunch b -P && cd ..
# and run with
$ export NODE_ENV=prod && nf start
# or
$ nf -e etc/prod.env start

This configuration is used for production.


Assuming you are in the root folder. Execute the following scripts:

$ ./scripts/run-tests (runs all the tests)

If you want to run the tests manually:

  1. e2e

In root folder:

Shell 1
$ nf -j -e etc/test.env start

Shell 2
$ cd test
$ npm run e2e
  1. server

In root folder:

# Shell 1
$ coffee rest/

# Shell 2
$ ./test/node_modules/.bin/mocha


To start and stop dummy rest server and web client with one command:

$ nf -j -e etc/dev.env start

For manually starting backend server

$ cd rest
$ forever -m 5 --minUptime 1000 --spinSleepTime 5000 --watch -c coffee

For manually starting web client

$ export NODE_ENV=dev
$ cd web
$ brunch w -s

Then go to localhost:3000


To run DIVAServices Spotlight in production mode follow those steps:

$ cd web && rm -r public && brunch b -P && cd ..
$ nf -e etc/prod.env start
You can’t perform that action at this time.