I have a hierarchy as follows
--> myexample.war
--> WEB-INF
--> web
--> admin
--> index.html
--> js
--> somejs.js
What should be my spray route to be able to serve it? (need to use spray).
I tried
val webRoute = path("web") {
get {
entity(as[String]) {
thePath =>
complete(getFromResourceDirectory(thePath))
}
}
}
getting:
> error: could not find implicit value for parameter marshaller:
> spray.httpx.marshalling.ToResponseMarshaller[spray.routing.RequestContext
> => Unit]
but it does not seem to be correct, how should I be using it to be able to serve any file from within the web directory?