Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m6s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
515 B
Plaintext
17 lines
515 B
Plaintext
;; lib/dream/demos/hello.sx — the canonical Dream "Hello, World!" (hello.ml).
|
|
;; Dream.run (Dream.router [Dream.get "/" (fun _ -> Dream.html "Hello!")]).
|
|
|
|
(define
|
|
dream-hello-app
|
|
(dream-router
|
|
(list
|
|
(dream-get "/" (fn (req) (dream-html "<h1>Hello, World!</h1>")))
|
|
(dream-get
|
|
"/hello/:name"
|
|
(fn
|
|
(req)
|
|
(dream-html (str "<h1>Hello, " (dream-param req "name") "!</h1>")))))))
|
|
|
|
;; entry point (installs the handler on the host):
|
|
;; (dream-run dream-hello-app)
|