Skip to content

A short example of using Slick with Scalatra with an in memory h2 database

Notifications You must be signed in to change notification settings

quii/scalatra-slick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slickfun

Quick example project of using scala slick with scalatra. Obviously not the best idea to have db code living in your controllers but this is strictly for demo only :)

Build & Run

$ cd slickfun
$ ./sbt
> container:start

Creating a user and then retrieving a list of all users

If you have httpie (https://github.com/jkbr/httpie) installed, you're gonna have a good time. Otherwise, curl your heart out.

Given the server is running...

$ http post http:https://localhost:8080/users first=chris last=james
$ http http:https://localhost:8080/users

Notes

The interesting code more or less all lives in MyScalatraServlet.scala

About

A short example of using Slick with Scalatra with an in memory h2 database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages