reneweb / hulk

Hulk is a web framework to create RESTful API's.

Version Matrix

#Hulk#

Build Status Coverage Status Codacy Badge Download

Hulk is a web framework to create RESTful API's. It is built on top of Akka HTTP.

Features include:

  • Basics (Routing, Filtering, Controller Actions)
  • Simple templating engine (using Mustache)
  • WebSocket support
  • Rate limiting
  • Versioning
  • Swagger
  • Built in metrics
  • OAuth server

Getting started

Set up dependency

Hulk is distributed via jcenter. Make sure that it is available as a resolver in your build. Then add the dependency to your build:

libraryDependencies ++= Seq ("io.github.reneweb" % "hulk-framework_2.11" % "0.3.1")

Simple usage example

object Application extends App {

  val action = Action(request => Ok())
  val router = new Router {
    override def router: Map[RouteDef, Action] = Map((HttpMethods.GET, "/test") -> action)
  }

  HulkHttpServer(router).run()
}

More examples: https://github.com/reneweb/hulk/tree/master/examples/src/main/scala/hulk