Skip to content

Instantly share code, notes, and snippets.

View themillhousegroup's full-sized avatar


View GitHub Profile
themillhousegroup / FrontEndServingController.scala
Created July 8, 2017 04:35
Play controller for serving a React App out of /public - including front-end routes
package controllers
import play.api.mvc.{Action, Controller}
import play.api.Logger
import javax.inject.Inject
import play.api.libs.json.Json
class FrontEndServingController @Inject() (val assets:Assets) extends Controller {

Keybase proof

I hereby claim:

  • I am themillhousegroup on github.
  • I am millhouse ( on keybase.
  • I have a public key whose fingerprint is 7F96 C377 F73B 29C8 17FE 4E24 1890 2E56 B58A 9B11

To claim this, I am signing this object:

themillhousegroup / DirectoryFileCreationWatcher
Last active May 21, 2018 20:55
Watching a directory with Scala Futures via Java nio
class DirectoryFileCreationWatcher(directoryToWatch:Path) {
import java.nio.file._
import java.nio.file.StandardWatchEventKinds._
import scala.collection.JavaConversions._
val watcher = FileSystems.getDefault.newWatchService
// Work properly on Mac: