8000 GitHub - roof42/akka-http-pg-slick: Simple project that demonstrate how akka http working with slick (Postgres)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

roof42/akka-http-pg-slick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Akka Http with Slick (Postgres)

Vary simple project that use for explain how to put Akka Http and Slick together.

Using docker compose

  1. Clone source from repo

git clone https://github.com/roof42/akka-http-pg-slick.git

  1. Build docker image

sbt docker:publishLocal

  1. Start compose

docker compose up -d

  1. Create database and initial data

sbt initialDatabase

  1. Test get all records

curl http://localhost:8080/message

  1. Test create new record

curl -H "Content-Type: application/json" -X POST -d '{"sender":"ruv", "content":"new content", "id":0}' http://localhost:8080/message

Basic Akka HTTP with Slick and Postgres

  1. Clone source from repo

git clone https://github.com/roof42/akka-http-pg-slick.git

  1. Start Postgres

docker run --name some-postgres -e POSTGRES_PASSWORD=my_secret -p 5432:5432 -d postgres

  1. Create database and initial data

sbt initialDatabase

  1. Run Api (Locally)

sbt runLocal

  1. Test g 57CF et all records

curl http://localhost:8080/message

  1. 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 and run using Docker

  1. Build docker image

sbt docker:publishLocal

  1. Run image locally

docker run -p 8080:8080 part2:0.1.0-SNAPSHOT

About

Simple project that demonstrate how akka http working with slick (Postgres)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0