akka-http , sbtweb and IO

119 views
Skip to first unread message

Anton Kulaga

unread,
Apr 26, 2015, 4:30:32 PM4/26/15
to akka...@googlegroups.com
Hello,

I am trying to use akka-http together with sbtweb to handle resources. 
But sbt-web itself is rather  confusing and there is a lack of documentation about IO in akka-http. 
If, say, I copy a file called main.css to public/ folder, how should I access it (with getFromResource(file)  ?) and what will be the exact path to main.css resource?

Akka Team

unread,
May 1, 2015, 5:29:19 PM5/1/15
to Akka User List

Hi Anton,
we will work on the missing documentation soon - no worries (we’ll make it complete for the 1.0 release) :-)
Having that said - “fromResource” methods work “as expected” when working with things JDK methods like getClass.getClassLoader.getResourceAsStream() - so it’s “what is on the classpath”).

For example, if you have a src/resources/public/main.css file it would be available as /public/main.css

// Note, written from memory - should be accurate though.

— Konrad


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam
Reply all
Reply to author
Forward
0 new messages