title: How to develop with akka and sbt?
body: <p>Developing with sbt I hardly use <code>~run</code> command, to say sbt pickup my code changes. This is very comfortable.</p>
  
  <p>Now I am going to play a bit with <a href="http://akka.io/" rel="noreferrer">akka</a>. Is there any way to bring back default sbt's behaviour, when ctrl+D stops application, and code picked up on the fly?</p>
  
  <p>Here is sample app:</p>
  
  <pre><code>object Main extends App {
    println("Starting actors...")
    val system = ActorSystem("MySystem")
    val myActor = system.actorOf(Props[Actors.MyActor], name = "myActor")
    myActor ! "test"
    // system.shutdown()
  }
  
  object Actors {
    class MyActor extends Actor {
    val log = Logging(context.system, this)
    def receive = {
      case "test" =&gt; log.info("received test")
      case _      =&gt; log.info("received something else")
    }
  }
  
  }
  </code></pre>
  
  <p>In such case <code>run</code> and <code>~run</code> commands nor interrupting by ctrl+D nor reloading code on change. Only ctrl+C to stop whole sbt. As I understand play framework have some solution for doing this, because looks like it stopping actor system on ctrl+D in <code>~run</code> mode</p>