Trying Netty

As with the Jetty server used for earlier console hacking, for Netty we also need a starter project. If you don’t have the g8 command line tool installed, please go back to that page until you do.

Enter the Console

This step will fetch a number of dependencies and sometimes certain repositories are a little wonky, so cross your fingers.

g8 unfiltered/unfiltered-netty --name=nettyplayin
cd nettyplayin
sbt console

Once you do get to a console, this should just work:

import unfiltered.response._
val hello = unfiltered.netty.cycle.Planify {
  case _ => ResponseString("hello world")

Direct a web browser to and you’ll be in hello world business.