Bialet#
Enhance HTML with a native integration to a persistent database
import "bialet" for Response
var users = `SELECT id, name FROM users`.fetch
var TITLE = "🗂️ Users list"
Response.out(
<!doctype html>
<html>
<head><title>{{ TITLE }}</title></head>
<body style="font: 1.5em/2.5 system-ui; text-align:center">
<h1>{{ TITLE }}</h1>
{{ users.count > 0 ?
<ul style="list-style-type:none">
{{ users.map{|user| <li>
<a href="/hello?id={{ user["id"] }}">
👋 {{ user["name"] }}
</a>
</li> } }}
</ul> :
/* Users table is empty */
<p>No users, go to <a href="/hello">hello</a>.</p>
}}
</body>
</html>
)
Bialet is a full-stack web framework that integrates the object-oriented Wren language with a HTTP server and a built-in SQLite database in a single app, creating a unified environment for web development.
Quickstart#
Clone or download the Bialet Skeleton repository and use Docker Compose to start the app.
git clone --depth 1 https://github.com/bialet/skeleton.git mywebapp
cd mywebapp
docker compose up
Visit 127.0.0.1:7000 in your browser.