- Java 8 or higher
- SBT (http://www.scala-sbt.org/)
- Docker (https://www.docker.com/)
To run ElasticSearch, use Docker:
docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.9
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.6.9
To run the business-index-api locally, including the loading of 100,000 test records, run the following:
sbt "run -DONS_BI_ES_RECREATE_INDEX=true -DONS_BI_ES_LOAD_TEST_DATA=true"
To package the project into a runnable fat-jar:
sbt assembly
To package the project into a .zip
file ready for deployment to CloudFoundry, run the following:
sbt universal:packageBin
Swagger UI is integrated into business-api. Exposed API documented and available within url:
http://localhost:9000/assets/lib/swagger-ui/index.html?/url=http://localhost:9000/swagger.json
short path:
http://localhost:9000/docs
Each request-response interaction carries a X-Response-Time
header with a millisecond value indicating the server
compute time.
A graph detailing all project dependencies can be found here. TODO: update If any sbt changes performed - please re-generate dependency graph by executing:
sbt -no-colors dependencyTree > dependencies.txt
Copyright © 2017, Office for National Statistics (https://www.ons.gov.uk)
Released under MIT license, see LICENSE for details.