Skip to content

usetrio/boilerplate-bikerent-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trio Java boilerplate

Scope

The goal of this project is to act as a starting point to solve the Java Backend "Bike Rent" Trio challenge.

Is a spring boot application that:

  • exposes two endpoints (/api/bikes and /api/bikes/[bikeId])
  • connects to a database to retrieve data.

Stack used

How to run the app locally

  • Default profile (this uses MySql database)

mvn spring-boot:run

  • memorydb profile (this uses H2 database)

mvn spring-boot:run -Dspring-boot.run.profiles=memorydb

How to run tests

mvn test

How to run the app using docker

  • Navigate to //docker
  • Make sure docker daemon is running

docker-compose up

This will use docker-compose.yml file to set up and start our services (database and app). You can add -d flag to run the process as a daemon.

Note: you may see that the application is failing to start, is because the database is not ready yet. It will restart until it can run properly.

Note 2: check .env file for environment variables.

  • To stop services (if running as daemon):

docker-compose down

  • To apply changes to sources, we need to instruct docker to build again to generate a new image.

    docker-compose up --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published