aboutsummaryrefslogtreecommitdiff
path: root/docs/src/app.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/app.gleam')
-rw-r--r--docs/src/app.gleam41
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/src/app.gleam b/docs/src/app.gleam
new file mode 100644
index 0000000..8d72ed9
--- /dev/null
+++ b/docs/src/app.gleam
@@ -0,0 +1,41 @@
+// IMPORTS ---------------------------------------------------------------------
+
+import lustre
+import lustre/attribute
+import lustre/element.{Element}
+import lustre/element/html
+
+// MAIN ------------------------------------------------------------------------
+
+pub fn main() -> fn(Msg) -> Nil {
+ let app = lustre.simple(init, update, view)
+ let assert Ok(dispatch) = lustre.start(app, "body", Nil)
+
+ dispatch
+}
+
+// MODEL -----------------------------------------------------------------------
+
+type Model {
+ Model
+}
+
+fn init(_) -> Model {
+ Model
+}
+
+// UPDATE ----------------------------------------------------------------------
+
+pub type Msg {
+ None
+}
+
+fn update(model: Model, msg: Msg) -> Model {
+ model
+}
+
+// VIEW ------------------------------------------------------------------------
+
+fn view(model: Model) -> Element(Msg) {
+ html.body([], [html.h1([], [element.text("Hello, world!")])])
+}