Skip to content

The Slick Akka Http is a very simple json rest api showing one way of using akka http with slick 3 library for database access.

License

Notifications You must be signed in to change notification settings

rofreytag/slick-akka-http

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slick-akka-http

The Slick Akka Http is a very simple json rest api showing one way of using akka http with slick 3 library for database access.

It supports the following features:

  • Generic Data Access layer, using slick-repo
  • Cake pattern for DI
  • Spray-json to parse json
  • Tests for routes

Utils:

  • Typesafe config for property management
  • Typesafe Scala Logging (LazyLogging)
  • Swagger for api documentation

The project was thought to be used as an activator template.

#Running

The database pre-configured is an h2, so you just have to:

    $ sbt run

#Testing

To run all tests:

    $ sbt test

#Using

With curl:

curl --request POST localhost:8080/supplier -H "Content-type: application/json" --data "{\"name\" : \"sup1\",\"desc\" : \"low prices\"}"

curl localhost:8080/supplier/1

You can also use swagger:

http://localhost:8080/swagger/index.html

#Credits

To make this template, I just mixed tutorials and templates, so credits for akka and slick guys, swagger-akka-http and slick-repo owners.

About

The Slick Akka Http is a very simple json rest api showing one way of using akka http with slick 3 library for database access.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.0%
  • CSS 5.1%
  • Other 0.9%