mogh_server

Crates.iomogh_server
lib.rsmogh_server
version1.3.0
created_at2026-01-17 22:08:24.117809+00
updated_at2026-01-25 20:26:02.658718+00
descriptionConfigurable axum server including TLS, Session, CORS, common security headers, and static file hosting.
homepage
repositoryhttps://github.com/moghtech/lib
max_upload_size
id2051273
size53,760
Maxwell Becker (mbecker20)

documentation

README

Mogh Server

Configurable axum server including Session, CORS, common security headers, and static file hosting.

struct Config;

impl mogh_server::ServerConfig for Config {
  fn port(&self) -> u16 {
    3100
  }
  fn ssl_enabled(&self) -> bool {
    true
  }
  fn ssl_key_file(&self) -> &str {
    "./ssl/key.pem"
  }
  fn ssl_cert_file(&self) -> &str {
    "./ssl/cert.pem"
  }
}

let app = Router::new()
  .route("/version", get(|| async { env!("CARGO_PKG_VERSION") }));

mogh_server::serve_app(
  app,
  Config,
).await?
Commit count: 101

cargo fmt