HGRC Quarry Fossil Service
Simple tools for lasting software

Infrastructure as a Service / Nemoptera

A solid foundation to fork, tweak, and enhance.

Public | Owner: Infrastructure as a Service | Default branch: trunk | Last update: 2026-11-08 16:13

Artifact deef6ca05cb53efe910387a282a19ec8f57595ab0e05df20dcf1168d4d2b4ed4:


(defmodule nemoptera_router
  (behaviour nova_router)
  (export all))

(defun routes (_environment)
  (let ((plugins (list (tuple 'pre_request 'nova_request_plugin
                              #M(read_urlencoded_body true parse_qs true))
                       (tuple 'post_request 'nova_request_plugin
                              #M(read_urlencoded_body true parse_qs true))))
        (public
         (list
          (tuple "/" #'nemoptera_public:index/1 #M(methods (get)))
          (tuple "/timeline" #'nemoptera_public:timeline/1 #M(methods (get)))
          (tuple "/rss" #'nemoptera_public:rss/1 #M(methods (get)))
          (tuple "/atom" #'nemoptera_public:atom/1 #M(methods (get)))
          (tuple "/setup" #'nemoptera_setup_pages:show/1 #M(methods (get)))
          (tuple "/setup" #'nemoptera_setup_pages:save/1 #M(methods (post)))
          (tuple "/login" #'nemoptera_login:show/1 #M(methods (get)))
          (tuple "/login" #'nemoptera_login:save/1 #M(methods (post)))
          (tuple "/logout" #'nemoptera_login:logout/1 #M(methods (get)))
          (tuple "/[...]" #'nemoptera_proxy:handle/1 #M(methods (get head post) extra_state #M()))))
        (admin
         (list
          (tuple "/" #'nemoptera_admin:home/1 #M(methods (get)))
          (tuple "/repos" #'nemoptera_admin:repos/1 #M(methods (get)))
          (tuple "/repos/new" #'nemoptera_admin:repo-new/1 #M(methods (get)))
          (tuple "/repos/new" #'nemoptera_admin:repo-create/1 #M(methods (post)))
          (tuple "/repos/:id" #'nemoptera_admin:repo-edit/1 #M(methods (get)))
          (tuple "/repos/:id" #'nemoptera_admin:repo-update/1 #M(methods (post)))
          (tuple "/repos/:id/delete" #'nemoptera_admin:repo-delete/1 #M(methods (get)))
          (tuple "/repos/:id/delete" #'nemoptera_admin:repo-delete-do/1 #M(methods (post)))
          (tuple "/repos/:id/sync" #'nemoptera_admin:repo-sync/1 #M(methods (post)))
          (tuple "/repos/:id/push" #'nemoptera_admin:repo-push/1 #M(methods (post)))
          (tuple "/orgs" #'nemoptera_admin:orgs/1 #M(methods (get)))
          (tuple "/orgs/new" #'nemoptera_admin:org-new/1 #M(methods (get)))
          (tuple "/orgs/new" #'nemoptera_admin:org-create/1 #M(methods (post)))
          (tuple "/orgs/:id" #'nemoptera_admin:org-edit/1 #M(methods (get)))
          (tuple "/orgs/:id" #'nemoptera_admin:org-update/1 #M(methods (post)))
          (tuple "/orgs/:id/delete" #'nemoptera_admin:org-delete/1 #M(methods (get)))
          (tuple "/orgs/:id/delete" #'nemoptera_admin:org-delete-do/1 #M(methods (post)))
          (tuple "/settings" #'nemoptera_admin:settings/1 #M(methods (get)))
          (tuple "/settings" #'nemoptera_admin:settings-save/1 #M(methods (post))))))
    (list
     (maps:from_list
      (list (tuple 'prefix "")
            (tuple 'security 'false)
            (tuple 'plugins plugins)
            (tuple 'routes public)))
     (maps:from_list
      (list (tuple 'prefix "/admin")
            (tuple 'security #'nemoptera_admin:auth-check/1)
            (tuple 'plugins plugins)
            (tuple 'routes admin))))))

Clone

You can clone this repository with the following command:

fossil clone https://hgrc.dev/IaaS/Nemoptera Nemoptera.fossil

Contribute

The best way to contribute is through e-mail. See the project documentation for more details.