Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keynmol/laminar-monaco-editor
My painful experiments with Webpack attempting to render Monaco Editor and produce a stream of code out of it
https://github.com/keynmol/laminar-monaco-editor
Last synced: 3 days ago
JSON representation
My painful experiments with Webpack attempting to render Monaco Editor and produce a stream of code out of it
- Host: GitHub
- URL: https://github.com/keynmol/laminar-monaco-editor
- Owner: keynmol
- Created: 2020-08-12T11:44:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-12T11:48:33.000Z (over 4 years ago)
- Last Synced: 2024-11-14T22:35:24.002Z (2 months ago)
- Language: Scala
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# http4s-laminar-stack ![build](https://github.com/keynmol/http4s-laminar-stack/workflows/build/badge.svg)
Example of
1. Client written with [Laminar](https://github.com/raquo/Laminar), interacting with server using [sttp](https://github.com/softwaremill/sttp)
2. Server with http4s serving both the compiled Javascript for the client and an endpoint for server-side interactions
3. Shared code with **protocol** definitions
4. Gzip compression on the server side
5. Docker packaging of the full application
6. Tests for the client with simulated DOM using [jsdom](https://github.com/scala-js/scala-js-env-jsdom-nodejs)
## Development mode
Run in SBT (uses fast JS compilation, not optimized):
```
sbt> ~runDev
```And open http://localhost:9000/frontend
This will restart the server on any changes: shared code, client/server, assets.
## Production mode
Run in SBT (uses full JS optimization):
```
sbt> ~runProd
```## Docker packaging
```
sbt> backend/docker:publishLocal
```Will publish the docker image with fully optimised JS code, and you can run the container:
```bash
✗ docker run --rm -p 8080:8080 backend:0.1.0-SNAPSHOTSLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Running server on http://0.0.0.0:8080 (mode: prod)
```The interface is fairly simple:
![](https://imgur.com/S0f0i8i.png)