/threshold

Take home test to create a rest API that filters out users by a given threshold amount

Primary LanguageJava

Threshold Challenge

Take home test to create a rest API that filters out users by a given threshold amount

Prerequisites

  • Java 8 installed and on the classpath
  • A modern web browser
  • Internet access

NOTE: The following commands were tested on MacOS. You may need to modify them for your operating system.

Download and Compile

  1. Download all files or clone this repository into a folder named challange
  2. Open a terminal (cmd window) and change to that directory
  3. Run the following command: ./gradlew bootJar

Start the Service

  1. Run the following command: java -jar ./build/libs/threshold-0.0.1-SNAPSHOT.jar &
  2. Open a browser tab or window to http://localhost:8443/successful_user?thresholdperc=50
  3. Change the thresholdperc value to see different results

Stop the Service

  1. Run the following command: ps -elf | grep jar
  2. Find the line that contains "java -jar" with a date about the time the application was stared
  3. Note the process ID (PID) number
  4. Run the following command: kill -9 <PID> repplacing with the process ID of the application