The api is following the unidirectional data model as follows:
- Root entity: User
- User can have multiple accounts
- Each account can be associated with multiple transactions
For the manual testing of the API, please use the provided transaction-api.postman_collection.json import. It contains a preconfigured collection of Postman requests with examples.
To run integration tests that are executed on Ktor's mock server engine (eliminating the need for actual HTTP requests)
execute the following command in terminal: ./gradlew test
Not implemented
To start the application from source code, execute ./gradlew run
in your terminal.
This will start the api on port 8080
, logging at build/logs/*.log
.
Alternatively, you can create a bootable jar via ./gradlew jar
, which will be created in build/libs
directory
and run it with java -jar build/libs/*.jar
.
This will start the api on port 8080
, logging at logs/*.log
.
Finally, the port the application binds to can be overridden by passing in your port as PORT
environment variable when starting the system process.