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 3eaef4e4deae6fc343857c3bd9485f87bcedf1cb43ed6896436e2b7b97069b5f:


(defmodule nemoptera_app
  (behaviour application)
  (export all))

(defun start (_type _args)
  (if (nemoptera_setup:installed?)
      (progn
        (nemoptera_config:reload)
        (case (nemoptera_db:open)
          (`#(ok ,_) 'ok)
          (`#(error ,reason)
           (logger:error "platform database did not open: ~p" (list reason)))))
      'ok)
  (case (nemoptera_sup:start_link)
    (`#(ok ,sup)
     (case (nova_sup:add_application 'nemoptera #M(port 8731))
       (`#(ok ,_app ,_host ,_port) `#(ok ,sup))
       (`#(error ,reason)
        (logger:error "routes were not registered: ~p" (list reason))
        `#(error ,reason))))
    (other other)))

(defun prep-stop (state) state)
(defun stop (_state) 'ok)

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.