Add SPA static file serving from backend
Backend (Server.hs): - serveStaticOrSpa: serves static files from --static-dir - SPA fallback: extensionless paths serve index.html - MIME type mapping for html/css/js/png/svg/ico/woff2 Frontend: - ES module imports with import map for Mithril CDN - Build script: tsc + copy index.html + static assets CLI: - --static-dir flag (default: frontend/dist) - scripts/run passes through extra args - Dockerfile CMD points at /usr/local/share/sis/static
This commit is contained in:
@@ -39,6 +39,8 @@ library
|
||||
, beeline-routing
|
||||
, bytestring
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, http-types
|
||||
, json-fleece-aeson
|
||||
, json-fleece-core
|
||||
@@ -75,6 +77,8 @@ executable sis-server
|
||||
, beeline-routing
|
||||
, bytestring
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, http-types
|
||||
, json-fleece-aeson
|
||||
, json-fleece-core
|
||||
@@ -114,6 +118,8 @@ test-suite sis-server-test
|
||||
, beeline-routing
|
||||
, bytestring
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, hspec
|
||||
, http-types
|
||||
, json-fleece-aeson
|
||||
|
||||
Reference in New Issue
Block a user