|
|
|
@ -55,6 +55,10 @@ impl Config {
|
|
|
|
|
/// # Examples
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
/// use gempress::Gempress;
|
|
|
|
|
/// use gempress::gemini;
|
|
|
|
|
/// use std::path::PathBuf;
|
|
|
|
|
///
|
|
|
|
|
/// let config = gempress::Config::from_identity(PathBuf::from("identity.pfx"), "password".into());
|
|
|
|
|
/// let mut app = Gempress::new(config);
|
|
|
|
|
///
|
|
|
|
@ -64,7 +68,7 @@ impl Config {
|
|
|
|
|
/// }
|
|
|
|
|
///
|
|
|
|
|
/// // Apply function handler to path
|
|
|
|
|
/// app.on("/foo", &foo_handler);
|
|
|
|
|
/// app.on("/foo", &index_handler);
|
|
|
|
|
///
|
|
|
|
|
/// app.listen(1965, || {
|
|
|
|
|
/// println!("Listening on port 1965");
|
|
|
|
@ -112,6 +116,8 @@ impl Gempress {
|
|
|
|
|
/// # Examples
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
/// use gempress::gemini;
|
|
|
|
|
///
|
|
|
|
|
/// let config = gempress::Config::from_identity(PathBuf::from("identity.pfx"), "password".into());
|
|
|
|
|
/// let mut app = Gempress::new(config);
|
|
|
|
|
///
|
|
|
|
|