Skip to content

uiua-lang/webua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5d92a27 · Mar 16, 2025

History

10 Commits
Mar 15, 2025
Mar 7, 2025
Mar 15, 2025
Mar 15, 2025
Feb 19, 2025

Repository files navigation

Webua

This is a very work-in-progress Uiua backend web framework.

Templating

Templating is done with tag functions. A tag function is passed a list of attributes and children.

The ! macro makes it easy to define attributes.

~ "git: github.com/uiua-lang/webua" ~ ! Html Head Body P Br H₁ Title Meta Style

Html {
  Head {
    Title "Example"
    Meta {!charset "utf-8"}
    Style {!href "style.css"}
  }
  Body {
    H₁ "Webua Example"
    P "This is a simple example of Webua templating."
    Br {}
  }
}

You can use normal Uiua primitives to fill out data.

~ "git: github.com/uiua-lang/webua" ~ Div H₁ Ul Li

$Users {"Alice" "Bob" "Carol"}
Div {
  H₁ "Users"
  Ul ⍚Li
}
## "<div><h1>Users</h1><ul><li>Alice</li><li>Bob</li><li>Carol</li></ul></div>"

Routing

Server routing is implemented by passing a router function to the Serve! macro. See the examples for how to do this.

About

A Uiua web framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published