Skip to content

Latest commit

 

History

History
81 lines (51 loc) · 1.85 KB

README.md

File metadata and controls

81 lines (51 loc) · 1.85 KB

Back-end

🛠️ Technologies

This project is built with:

  • Scala: Modern language both functional and OOP, best of the two world !
  • Play: A minimalistic back-end framework for the jvm languages, easy to test
  • MongoDB: A noSQL database to store beats and groovy rhythms :)

📚 References

Misc. references used in this project

▶️ Run the backend

1. Create the env file :

copy the .env.sample file in the current folder, and rename the copy in .env

2. Execute the back-end in docker

Go to the backend folder cd ./backend/

Build app image docker build -t drum-beat-repo-app-image .

Run mongo db and the previous image docker-compose up -d

🛠️ Debug the backend

Run DrumBeatRepo alone (don't forget to stop the corresponding docker container)

sbt run

🔫 Execute the tests

sbt test

Access the database

Use the connection string mongodb://admin:[email protected]:27017/admin

⚠️ Dont't forget to authenticate️

mongosh --username admin --password pass

Useful links

Coverage

  • Run coverage
    • sbt coverage test
  • Generate report
    • sbt coverageReport

How to build docker image

Build image

docker build -t drum-beat-repo-app-image .

docker build --build-arg API_KEY='<YOURAPIKEY>' -t drum-beat-repo-app-image .

Run a container with this image

docker run -p 9000:9000 -it drum-beat-repo-app-image