Vary simple project that use for explain how to put Akka Http and Slick together.
- Clone source from repo
- Build docker image
sbt docker:publishLocal
- Start compose
docker compose up -d
- Create database and initial data
sbt initialDatabase
- Test get all records
- Test create new record
curl -H "Content-Type: application/json" -X POST -d '{"sender":"ruv", "content":"new content", "id":0}' http://localhost:8080/message
- Clone source from repo
- Start Postgres
docker run --name some-postgres -e POSTGRES_PASSWORD=my_secret -p 5432:5432 -d postgres
- Create database and initial data
sbt initialDatabase
- Run Api (Locally)
sbt runLocal
- Test g 57CF et all records
- Test create new record
curl -H "Content-Type: application/json" -X POST -d '{"sender":"ruv", "content":"new content", "id":0}' http://localhost:8080/message
- Build docker image
sbt docker:publishLocal
- Run image locally
docker run -p 8080:8080 part2:0.1.0-SNAPSHOT