You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.4 KiB

4 years ago
4 years ago
  1. # Scalajs-react independent demo
  2. This is a demo of an independent scalajs sbt project consisting of only the frontend, that communicates with the backend from the [play-slick-demo project](https://git.arcusiridis.com/nova/Scala-Play-Slick-Demo) -
  3. This is useful because configuring play to serve frontend files is a hassle, libray bundling mode refused to work for me in the integrated project whereas here it's trivial. Library bundling mode makes incremental compilation really fast( ~2 seconds ). This also speeds up incremental compilation of the backend project.
  4. I have ported over all the code from my previous scalajs-react project, and this is the one I will be using primarily from now.
  5. Other features are -
  6. 1. HOCON configuration to make backend url conifgurable
  7. 2. Scalajs-react with routing for SPA
  8. 3. Effect wrappers (cats IO/monix Task) (TODO)
  9. ## Usage
  10. Steps -
  11. 1. Clone this project
  12. 2. Clone [backend project](https://git.arcusiridis.com/nova/Scala-Play-Slick-Demo)
  13. 3. Run the [backend project](https://git.arcusiridis.com/nova/Scala-Play-Slick-Demo)
  14. 4. Configure the url for the backend project in this project 's application.conf file
  15. 5. Run this project with -
  16. ```
  17. sbt "fastOptJS::startWebpackDevServer; ~fastOptJS" shell
  18. ```
  19. This starts the webpack dev server, the scalajs-bundler to bundle js dependencies, and js file continuous compilation
  20. 6. Open `http://localhost:8080` to see it in action