Auto-Refresh for Play Framework Apps

Over this past weekend I built a little tool for Play Framework app developers which auto-refreshes an app in Chrome when the source code or static assets change.

Check out a video demonstration:

For information on how to set it up, check out the project on GitHub:

Special thanks to Josh Suereth for helping me figure out the SBT magic.

  • Hi James,

    Great work !
    I just wanted to know if you used the LiveReload protocol to do this?
    And if not, is there a reason why?

    Will make Play! development almost magic :)


    • Not right now but it could! It uses a WebSocket that just says “reload” and then JavaScript refreshes the page. Simple but could definitely be improved.

  • Maxence Warzecha

    Sounds very good. Trying right now!

  • pavan bangaram

    Great tutorial..! Than x for this.!

  • It should be built-in functionality! Just great!

  • James Lee

    Hi James, awesome work! Is it possible for you to make this extension to be compatible for Play 1.2.5 as well? :)

    • I don’t think so since this requires file system watchers which Play 1.x doesn’t have.

  • Kevin

    Hi James – does this work for when I modify `index.scala.html`? Thanks.

    • It should work with all modifications.

  • Ankit SR

    hi James, i m working on a play project, i want to switch between different pages without refreshing them.
    can you plz help me…

  • Pingback: Scala with SublimeText | In translation()

  • Anjan Pathak

    Thanks James but what is build.sbt. Cannot seem to find it in a play application

  • Ivan Lagunov

    Thanks a lot! Indeed is it planned to make it built-in functionality?

  • Franck

    Hi James,

    it seems great unfortunately I’ve got an error when I add _*
    in the settings in my Build.scala :
    val main = play.Project(appName, appVersion, appDependencies).settings( _*,
    scalacOptions += “-feature”,
    closureCompilerOptions += “ecmascript5”,


    I’m sure I’ve missed something as the syntax is still esoteric to me!

    • Try:

      val main = play.Project(appName, appVersion, appDependencies).settings( _*).settings(
      scalacOptions += "-feature",
      closureCompilerOptions += "ecmascript5")