Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Rohan Sircar
72ddfc3087
|
před 4 roky | |
---|---|---|
assets | před 4 roky | |
project | před 4 roky | |
src/main | před 4 roky | |
.gitignore | před 4 roky | |
.scalafmt.conf | před 4 roky | |
README.md | před 4 roky | |
build.sbt | před 4 roky | |
index.html | před 4 roky | |
yarn.lock | před 4 roky |
README.md
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 one I will be using primarily from now.
Other features are -
- HOCON configuration to make backend url conifgurable
- Scalajs-react with routing for SPA
- Effect wrappers (cats IO/monix Task) (TODO)
Usage
Steps -
- Clone this project
- Clone backend project
- Run the backend project
- Configure the url for the backend project in this project 's application.conf file
- 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
- Open
http://localhost:8080
to see it in action