Datastar SDK for Gerbil
- Scheme 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| http | ||
| .gitignore | ||
| build.ss | ||
| example.ss | ||
| gerbil.pkg | ||
| http-test.ss | ||
| http.ss | ||
| LICENSE | ||
| README.md | ||
Datastar Gerbil SDK
This package provides a Gerbil SDK for Datastar v1.0.2 on Gerbil v19's embedded :std/net/http/server.
(import :gerbil-datastar/http)
Installation
gerbil pkg install git.cons.io/jay/gerbil-datastar
Development
Install the SSE dependency, then build and test:
gerbil pkg install git.cons.io/jay/gerbil-sse
gerbil build
gerbil test -v 0 ./...
The opt-in official conformance suite requires Go:
gerbil test -v 0 -D datastar-conformance ./http/conformance-test.ss
Long-lived SSE handlers should use a server configured with response-timeout: !NoTimeout. For now, applications should send periodic events or heartbeats because disconnects are discovered by a later write or server shutdown (TODO: fix).
Example
After building the package:
gerbil env gxi ./example.ss
Open http://127.0.0.1:8001/.
License
MIT