Skip to content

My painful experiments with Webpack attempting to render Monaco Editor and produce a stream of code out of it

Notifications You must be signed in to change notification settings

keynmol/laminar-monaco-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http4s-laminar-stack build

Example of

  1. Client written with Laminar, interacting with server using 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

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:

✗ docker run --rm -p 8080:8080 backend:0.1.0-SNAPSHOT

SLF4J: 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:

About

My painful experiments with Webpack attempting to render Monaco Editor and produce a stream of code out of it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published