mirror of
https://github.com/phfroidmont/scalive.git
synced 2025-12-25 05:26:59 +01:00
Setup example module with JS bundle configured
This commit is contained in:
parent
486e89c1f1
commit
aae3db841b
7 changed files with 39 additions and 7 deletions
3
example/js/src/app.js
Normal file
3
example/js/src/app.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { scalive } from "core/js/index"
|
||||
|
||||
console.log(scalive)
|
||||
|
|
@ -17,4 +17,6 @@ object Example extends ZIOAppDefault:
|
|||
)
|
||||
)
|
||||
|
||||
override val run = Server.serve(liveRouter.routes).provide(Server.default)
|
||||
val routes = liveRouter.routes @@ Middleware.serveResources(Path.empty / "static", "public")
|
||||
|
||||
override val run = Server.serve(routes).provide(Server.default)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ object RootLayout:
|
|||
htmlRootTag(
|
||||
lang := "en",
|
||||
headTag(
|
||||
metaTag(charset := "utf-8")
|
||||
metaTag(charset := "utf-8"),
|
||||
scriptTag(defer := true, typ := "text/javascript", src := "/static/app.js")
|
||||
),
|
||||
bodyTag(
|
||||
content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue