object MinimalApplication extends cask.MainRoutes{
@cask.get("/")
def hello() = {
"Hello World!"
}
@cask.post("/do-thing")
def doThing(request: cask.Request) = {
request.text().reverse
}
initialize()
}
Cask is a simple Scala web framework inspired by Python's Flask project. It aims to bring simplicity, flexibility and ease-of-use to Scala webservers, avoiding cryptic DSLs or complicated asynchrony.
Cask is profiled using the JProfiler Java Profiler, courtesy of EJ Technologies
- Bump uPickle, Requests versions
- Add
SameSite
cookie attribute - Fix bug in default parameters of cask routes
- Extract
cask-actor
into its own repo and artifact, https://github.com/lihaoyi/castor
- Separate
cask-actor
into a separate artifact, documented separately as Cask Actors
- Support for Scala 2.13.1
-
Mismatched decorator types applied to a single method is now a compile error
-
staticFiles
andstaticResources
now allows you to specify response headers -
Allow
cask.decorators.compress
to be used as acask.Routes
orcask.Main
decorator without crashing on websocket responses -
Allow decorators to be defined and used for non-
cask.Response
results
- Fix crashes in
cask.WebsocketClientImpl
- Provide a simple cross-platform builtin websocket client in
cask.WsClient
- Make
Routes#log
implicit
- Cross-publish
cask.util
for Scala.js
- Embed
concurrent.ExecutionContext.global
incask.Routes
by default, to be overriden if necessary
- Internal refactoring to clean up routing logic
- Standardize on a basic
cask.Logger
interface - Create a simple actor-based API for handling websockets in
cask.WsHandler
andcask.WsActor
cask.Response
is now covariant
- Use standard
./mill
bootstrap script
- Support for Scala 2.13.0