Demo project based on sbt new scalatra/scalatra.g8
. It contains some of the features demonstrated on http://scalatra.org/guides/2.6/
- logging with logback
- debug configuration
- api endpoint (APIServlet) with
- Named parameters
- specific status code
- incoming/outoging json support
- 404/not found handling
- server side exception handling
- handling cookies and session attributes
- WebSockets support (use chrome extension Smart Websocket Client to test)
- sql DB support
- linting using scalastyle (recognized automatically by intellij)
- packaging to app into docker container
- http client
- basic metrics
Configure Intellij
First run jetty and after that run the debug config
$ cd scalatraseed
$ sbt
> ~;jetty:stop;jetty:start
> browse
If browse
doesn't launch your browser, manually open http://localhost:8080/ in your browser.
sbt docker:publishLocal
cd docker
docker-compose up