Skip to content

muuvy/muuvy-backend

Repository files navigation

muuvy rest-api

Build Status Quality Gate Status Coverage

Defintions

  • Throntail Version: 2.4.0.Final
  • Config files in YAML format

Project Setup

Requirements

  • Install Lombok Plugin Intellij Plugin / Jar / VS Code Plugin
  • Install Maven 3.3+ from here
  • Start docker-compose (Prometheus and MongoDB Docker) pull .git and run in the downloaded .git folder "docker-compose up"
  • download and extract Prometheus:
wget https://github.com/prometheus/prometheus/releases/download/v2.10.0/prometheus-2.10.0.windows-amd64.tar.gz
tar -xvf  prometheus-2.10.0.windows-amd64.tar.gz prometheus-2.10.0.windows-amd64/

To install the dependencies, first run mvn install. Run the application with this command:

$ mvn thorntail:run
Thorntail is ready

Port: 8888

Verify if the server is up and running, by visit this http://localhost:8888/api/users

Endpoints

  • GET /api/users
  • POST /api/users
  • DELETE /api/users
  • GET /api/users/{userId}
  • GET /api/users/{userId}/favourites
  • POST /api/users/{userId}/favourites
  • DELETE /api/users/{userId}/favourites
  • GET /api/users/search/{userName}
  • POST /api/login

Run the Project with IntelliJ

Start Options -> Edit Configuration -> Add Application -> Set Main class to org.muuvy.backend.RestServiceTest

Configuration

All thorntail configurations are located in src/main/resources/project-defaults.yml. Each environment has its own config file.

Prometheus

Components

Thorntail

  • JAX RS
  • LOG
  • CDI

JBoss

  • Logger

Misc

  • Lombok
  • Junit Jupiter
  • Mongo Java Driver
  • Hibernate OGM Mongo