Closed chrismurrph closed 9 years ago
Probably not going to merge this as is; glad this was of use to you though =)
Yes it is not really complete with 'notes' rather than being properly scripted as I'm sure can be done in sbt. I put it up because it took me too long to get it working.
Use to get the 'Web Server File Browsing' application at clientserver2 going with a Web Server other than spray-can - actually Jetty here. Also now the webapp is served from http://localhost:8080/browser/ rather than http://localhost:8080.
The server shared directory will need to be symlinked to the client one. For Windows:
C:>mklink /J C:\dev\atmosphere\examples\crossBuilds\clientserver2\server\shared C:\dev\atmosphere\examples\crossBuilds\clientserver2\client\shared
This is the response:
Junction created for C:\dev\atmosphere\examples\crossBuilds\clientserver2\server \shared <<===>> C:\dev\atmosphere\examples\crossBuilds\clientserver2\client\shar ed
C:\dev\hands-on-scala-js\examples\crossBuilds\clientserver2>sbt SBT> client/fastOptJS SBT> package Then you just need to copy the resultant jar file like this: copy server_2.11-0.1-SNAPSHOT.jar C:\jetty-9.2.6\webapps\browser\WEB-INF\lib
Make sure to have placed the web.xml from the on_jetty_1.3_scala-2.11 branch from spray-template at C:\jetty-9.2.6\webapps\browser\WEB-INF and application.conf at C:\jetty-9.2.6\webapps\browser\WEB-INF\classes.
application.conf looks like this:
akka { loglevel = INFO }
spray.servlet { boot-class = "simple.Boot" request-timeout = 1s }
Last thing of importance is the files to go in C:\jetty-9.2.6\webapps\browser\WEB-INF\lib, so here's a directory listing:
akka-actor_2.11-2.3.5.jar autowire_2.11-0.2.3.jar config-1.2.1.jar jawn-parser_2.11-0.6.0.jar jetty-spray_2.11-0.1._jar mimepull-1.9.4.jar parboiled-core-1.1.6.jar parboiled-scala_2.11-1.1.6.jar scala-library-2.11.2.jar scala-xml_2.11-1.0.2.jar scalatags_2.11-0.4.2.jar server_2.11-0.1-SNAPSHOT.jar shapeless_2.11-1.2.4.jar spray-httpx_2.11-1.3.2.jar spray-http_2.11-1.3.2.jar spray-routing_2.11-1.3.2.jar spray-servlet_2.11-1.3.2.jar spray-util_2.11-1.3.2.jar upickle_2.11-0.2.5.jar