Scala.js example with a Spray server
This is a slightly overhauled version of Li Haoyi's client-server example described in Hands-on-Scala.js
- Install SBT
- Start SBT by typing
sbt
in this project's root directory - Start the server:
sbt> ~appJVM/re-start
(this will automatically restart the server after editing a file) - Point your browser to
localhost:8080
- You can shut down the server by hitting enter in the SBT console and typing
re-stop
.re
stands for sbt-revolver. - Don't forget to
reload
in the SBT console after making changes tobuild.sbt
- Instead of automatically restarting the server after changing a file with
~re-start
, you can manually restart the server in the SBT console using;appJVM/re-stop;reload;appJVM/re-start