Wiki
Clone wikiiledocs / Installation
Database
The project uses MongoDB as a datastore.
You should setup a MongoDB database with the database local and the collection iledocs.
RoboMongo can be use for easy administrating the database.
Build Server
git clone https://m1hael@bitbucket.org/m1hael/iledocs.git iledocs
cd iledocs/iledocs.rest
mvn package
The target folder contains the iledocs.rest-x.x.x.jar file which contains the REST server and everything necessary to run it (except the Java Runtime Environment).
Run Server
As the server is packaged as one big fat jar file you can run it just by executing the jar file.
java -jar target/iledocs.rest-1.0.0.jar server src/main/resources/config.yml
Configuration
The jar file contains everything except the configuration for the server. This way you can use the same jar file in every stage without needing to change anything on the jar file.
The configuration says which ports the server uses for its REST services and connection properties to the MongoDB database.
A sample configuration file looks like this:
#!yaml server: applicationConnectors: - type: http port: 8080 adminConnectors: - type: http port: 8081 mongocollection: iledocs
Other connection properties are
- mongohost
- mongoport
- mongodb
For every other configuration properties look at the Dropwizard website.
Test Server
To test the server you can either run the ping REST service or use the admin interface on port 8081.
curl http://localhost:8080/ping
Updated