aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-25 01:12:12 -0700
committerFuwn <[email protected]>2022-04-25 01:12:12 -0700
commited6e5a3b1b73240ba21ec12cb9bfa5cf29b7881f (patch)
tree16bead8ca5f3b59db93689ec39dc7d0aedf89faf /src/main.rs
parentfeat(quotes): add a quote (diff)
downloadlocus-ed6e5a3b1b73240ba21ec12cb9bfa5cf29b7881f.tar.xz
locus-ed6e5a3b1b73240ba21ec12cb9bfa5cf29b7881f.zip
refactor(modules): move static mounts to modules
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/main.rs b/src/main.rs
index 6ab7086..b3820d5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -152,44 +152,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
router.attach_stateless(modules::remarks::module);
router.attach_stateless(modules::multi_blog::module);
router.attach_stateless(modules::random::module);
- });
-
- time_mounts("static", &mut time_mount, || {
- batch_mount!(
- "files",
- router,
- (
- "/robots.txt",
- "Crawler traffic manager, for robots, not humans",
- "robots.txt"
- ),
- ("/favicon.txt", "This Gemini capsule's icon", "favicon.txt"),
- );
-
- batch_mount!(
- "pages",
- router,
- ("/", "This Gemini capsule's homepage", "index"),
- ("/contact", "Many ways to contact Fuwn", "contact"),
- ("/donate", "Many ways to donate to Fuwn", "donate"),
- (
- "/gemini",
- "Information and resources for the Gemini protocol",
- "gemini"
- ),
- (
- "/gopher",
- "Information and resources for the Gopher protocol",
- "gopher"
- ),
- ("/interests", "A few interests of Fuwn", "interests"),
- ("/skills", "A few skills of Fuwn", "skills"),
- (
- "/licensing",
- "The licensing terms of this Gemini capsule",
- "licensing"
- ),
- );
+ router.attach_stateless(modules::r#static::module);
});
std::thread::spawn(search::index);