- Java 8 or higher
- SBT (Download)
To install SBT quickly you can use Homebrew (Brew):
brew install sbt
Similarly we can get Scala (for development purposes) using brew:
brew install scala
To compile, build and run the application use the following command:
sbt api/run `-Dhttp.port=9002`
The default application port is 9000. To specify an alternative port use -Dhttp.port=8080
.
To package the project in a runnable fat-jar:
sbt assembly
To test all test suites we can use:
sbt test
Testing an individual test suite can be specified by using the testOnly
.
SBR Api uses its own test configuration settings for integration tests, the details of which can be found on theONS Confluence.
To run integration test run:
sbt it:test
SeeCONTRIBUTING for more details on creating tests.
Swagger API is used to document and expose swagger definitions of the routes and capabilities for this project.
To see the full definition set use path:
http://localhost:9000/swagger.json
For a graphical interface using Swagger Ui use path:
http://localhost:9000/docs
See FAQ for possible and common solutions.
See CONTRIBUTING for details.
Copyright © 2017, Office for National Statistics (https://www.ons.gov.uk)
Released under MIT license, see LICENSE for details.