You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can find runnable examples of how to use the SDK in multiple concrete web application frameworks and contexts in the [examples](examples/README.md) folder.
This directory contains examples of using Datastar in Kotlin.
11
+
All are a simple counter implemented using Datastar server-sent events.
12
+
13
+
- the front end consists in a single HTML page located in the `front` directory
14
+
- each back implementation is in a separate directory, consisting in a single Kotlin file
15
+
16
+
## Running the examples
17
+
18
+
### Prerequisites
19
+
20
+
To make the examples work as simply as possible, each back implementation is a JBang script.
21
+
22
+
JBang is a tool that allows to run Kotlin scripts taking care of all the dependencies without the need to use more heavy weight tools like Maven or Gradle.
23
+
You can find the installation instructions on the [official documentation](https://www.jbang.dev/documentation/jbang/latest/installation.html).
24
+
25
+
### Java HTTP Server
26
+
27
+
This example uses the plain Java `HttpServer` to serve the front end. ([code](java-httpserver/server.kt))
0 commit comments