You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am quite new in this library but I missing a css method, when I provide static resources I implemented this code:
case Method.GET -> !! / "js"/ file =>
val content = Source.fromFile(s"./static/js/$file").getLines.toList.mkString("\n")
Response.text(content)
case Method.GET -> !! / "css"/ file =>
val content = Source.fromFile(s"./static/js/$file").getLines.toList.mkString("\n")
Response.text(content)
case Method.GET -> !! / "html"/ file =>
val content = Source.fromFile(s"./static/js/$file").getLines.toList.mkString("\n")
Response.html(content)
It works for javascript files when I reference this file from html:
<script src="js/app.js"></script>
but this way to load static files does not work for css files, maybe I am missing the proper way to do it but it would be very nice a Response method to deliver javascript files or css files like:
I am quite new in this library but I missing a css method, when I provide static resources I implemented this code:
It works for javascript files when I reference this file from html:
<script src="js/app.js"></script>
but this way to load static files does not work for css files, maybe I am missing the proper way to do it but it would be very nice a Response method to deliver javascript files or css files like:
Response.javascript(local-path)
Response.css(local-path)
Any suggestion?
The text was updated successfully, but these errors were encountered: