Skip to content

HTTP server with REST API for money transfer between bank accounts (Revolut Backend Task)

Notifications You must be signed in to change notification settings

pwittchen/money-transfer-api

Repository files navigation

money-transfer-api Build Status codecov

HTTP server with REST API for money transfer between bank accounts. Description of the task can be found in TASK.md file.

Contents

Building and running the application

Please note: If we're on Windows, use gradlew.bat instead of ./gradlew script

  • This application requires Java 11 for building and running
  • To build an application, execute: ./gradlew build
  • To start an application on default port 8000, execute: ./gradlew run
  • To build an application as a "fat jar", execute: ./gradlew shadowJar
  • To start an application as a "fat jar" on the default port 8000, execute: java -jar build/libs/app-1.0-SNAPSHOT-all.jar
  • To start an application as a "fat jar" on a custom port, execute: java -jar build/libs/app-1.0-SNAPSHOT-all.jar PORT_NUMBER where PORT_NUMBER is an integer value

API documentation

  • Start Docker Daemon if it's not runnig: sudo dockerd &
  • Start compiled application: java -jar build/libs/app-1.0-SNAPSHOT-all.jar
  • Run ReDoc: ./gradlew redoc (if you're Windows user, run contents from the redoc.sh script manually)
  • Open website with documentation in the web browser: http://localhost:9000
  • Moreover, API is also documented by tests in RestApiIntegrationTest class

Tests

  • running all tests: ./gradlew test
  • running unit tests: ./gradlew test -Dtest.profile=unit
  • running integration (REST API) tests: ./gradlew test -Dtest.profile=integration
  • creating test coverage report: ./gradlew test jacocoTestReport (report will be in build/reports/jacoco/ dir)

Code style

Code style used in the project is called Square from Java Code Styles repository by Square.

About

HTTP server with REST API for money transfer between bank accounts (Revolut Backend Task)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published