summaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
authorLi Haoyi <haoyi@dropbox.com>2014-11-26 23:47:17 -0800
committerLi Haoyi <haoyi@dropbox.com>2014-11-26 23:47:17 -0800
commit3bf82c833b15c2a2e0078b156f5ea48e171a463a (patch)
treef9bd6ff3482e9653f4a6c3d42b03355fb971a881 /book
parentcc4781d9af3cb57c39a4ac26283f6428ad2aaa60 (diff)
downloadhands-on-scala-js-3bf82c833b15c2a2e0078b156f5ea48e171a463a.tar.gz
hands-on-scala-js-3bf82c833b15c2a2e0078b156f5ea48e171a463a.tar.bz2
hands-on-scala-js-3bf82c833b15c2a2e0078b156f5ea48e171a463a.zip
client-server example works
Diffstat (limited to 'book')
-rw-r--r--book/src/main/scala/book/BookData.scala1
-rw-r--r--book/src/main/scalatex/book/handson/ClientServer.scalatex2
2 files changed, 3 insertions, 0 deletions
diff --git a/book/src/main/scala/book/BookData.scala b/book/src/main/scala/book/BookData.scala
index f448521..c306475 100644
--- a/book/src/main/scala/book/BookData.scala
+++ b/book/src/main/scala/book/BookData.scala
@@ -43,6 +43,7 @@ object BookData {
script(s"$main(document.getElementById('$tagId'))")
)
}
+
def split = div(cls:="pure-g")
def more = div(cls:="pure-u-1 pure-u-md-13-24")
def less = div(cls:="pure-u-1 pure-u-md-11-24")
diff --git a/book/src/main/scalatex/book/handson/ClientServer.scalatex b/book/src/main/scalatex/book/handson/ClientServer.scalatex
index 3a952dc..3fcf016 100644
--- a/book/src/main/scalatex/book/handson/ClientServer.scalatex
+++ b/book/src/main/scalatex/book/handson/ClientServer.scalatex
@@ -74,6 +74,8 @@
@p
Now, if we go to the browser at @code{localhost:8080}, we should see our web-page!
+ @iframe(src:="https://hands-on-scala-js.herokuapp.com/", width:="100%", height:="300px", "frameBorder".attr:="0")
+
@sect{Client-Server Reflections}
@p
By now you've already set up your first client-server application. However, it might not be immediately clear what we've done and why it's interesting! Here are some points to consider.