Go to file
2020-08-22 16:50:34 +05:30
assets First commit 2020-08-22 16:50:34 +05:30
project First commit 2020-08-22 16:50:34 +05:30
src/main First commit 2020-08-22 16:50:34 +05:30
.gitignore First commit 2020-08-22 16:50:34 +05:30
.scalafmt.conf First commit 2020-08-22 16:50:34 +05:30
build.sbt First commit 2020-08-22 16:50:34 +05:30
index.html First commit 2020-08-22 16:50:34 +05:30
README.md First commit 2020-08-22 16:50:34 +05:30
yarn.lock First commit 2020-08-22 16:50:34 +05:30

Scalajs-react independent demo

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 - 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.

I have ported over all the code from my previous scalajs-react project, and this is the only I will be using primarily from now.

Other features are -

  1. HOCON configuration to make backend url conifgurable
  2. Scalajs-react with routing for SPA
  3. Effect wrappers (cats IO/monix Task) (TODO)

Usage

Steps -

  1. Clone this project
  2. Clone backend project
  3. Run the backend project
  4. Configure the url for the backend project in this project 's application.conf file
  5. Run this project with -
     sbt "fastOptJS::startWebpackDevServer; ~fastOptJS" shell
    
    This starts the webpack dev server, the scalajs-bundler to bundle js dependencies, and js file continuous compilation
  6. Open http://localhost:8080 to see it in action