diff options
author | Li Haoyi <haoyi@dropbox.com> | 2015-01-25 18:47:43 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2015-01-25 18:47:43 -0800 |
commit | 2e9a726bfbea4a25183a2649e4e0b85519fe8e8a (patch) | |
tree | 4b16125360ea8c98bee2e2fec935dfe2d3796329 /book/src/main/scalatex/book/handson/ClientServer.scalatex | |
parent | d66fd4a85cd13006acad380dd36634277fdf4988 (diff) | |
download | hands-on-scala-js-2e9a726bfbea4a25183a2649e4e0b85519fe8e8a.tar.gz hands-on-scala-js-2e9a726bfbea4a25183a2649e4e0b85519fe8e8a.tar.bz2 hands-on-scala-js-2e9a726bfbea4a25183a2649e4e0b85519fe8e8a.zip |
afaict everything works
Diffstat (limited to 'book/src/main/scalatex/book/handson/ClientServer.scalatex')
-rw-r--r-- | book/src/main/scalatex/book/handson/ClientServer.scalatex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/book/src/main/scalatex/book/handson/ClientServer.scalatex b/book/src/main/scalatex/book/handson/ClientServer.scalatex index 8cbf9cf..87c959d 100644 --- a/book/src/main/scalatex/book/handson/ClientServer.scalatex +++ b/book/src/main/scalatex/book/handson/ClientServer.scalatex @@ -81,7 +81,8 @@ @p You may have noticed in both client and server, we have made reference to a mysterious @hl.scala{FileData} type which holds the name and size of each file. @hl.scala{FileData} is defined in the @code{shared/} folder, so it can be accessed from both Scala-JVM and Scala.js: - @hl.ref(client/"FileData.scala") + + @hl.ref(wd/'examples/'crossBuilds/'clientserver/'client/'shared/'main/'scala/'simple/"FileData.scala") @p Now, if we go to the browser at @code{localhost:8080}, we should see our web-page! @@ -178,7 +179,7 @@ @p Let's start with our client-server interface definition - @hl.ref(client2/"Shared.scala") + @hl.ref(wd/'examples/'crossBuilds/'clientserver2/'client/'shared/'main/'scala/'simple/"Shared.scala") @p Here, you can see that in addition to sharing the @hl.scala{FileData} class, we are also creating an @hl.scala{Api} trait which contains the signature of our @hl.scala{list} method. The exact name of the trait doesn't matter. We need it to be in @code{shared/} so that the code in both client and server can reference it. |