An ergonomic and elegant framework for creating Gemini servers and SCGI apps without needless bloat
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB

use anyhow::*;
use log::LevelFilter;
use kochab::{Server, Response, Document};
use kochab::document::HeadingLevel::*;
async fn main() -> Result<()> {
.filter_module("kochab", LevelFilter::Debug)
let response: Response = Document::new()
.add_preformatted_with_alt("kochab", include_str!("kochab_logo.txt"))
"Kochab is an extension & a fork of the Gemini SDK [northstar]. Where",
" northstar creates an efficient and flexible foundation for Gemini projects,",
" kochab seeks to be as ergonomic and intuitive as possible, making it",
" possible to get straight into getting your ideas into geminispace, with no",
" worrying about needing to build the tools to get there."
.add_link("", "GitHub")
.add_heading(H2, "Usage")
.add_text("Add the latest version of kochab to your `Cargo.toml`.")
.add_preformatted_with_alt("toml", r#"kochab = { git = "" }"#)
.add_heading(H2, "Generating a key & certificate")
.add_preformatted_with_alt("sh", concat!(
"mkdir cert && cd cert\n",
"openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365",
.add_route("/", response)