Skip to main content

Crate apiplant_server

Crate apiplant_server 

Source
Expand description

§apiplant-server

Turns a loaded App into a running HTTP service on ntex:

  • generic CRUD routes for every resource (<base>/<resource>[/<id>]),
  • built-in auth routes (<base>/auth/...),
  • one route per loaded function (<base>/functions/<name>),
  • lifecycle hooks running functions around each CRUD operation,
  • the admin dashboard, embedded in the binary and served at /admin/ for every app unless [admin] enabled = false,
  • file uploads (<base>/uploads) served back from /files/..., over a directory or an S3-compatible bucket,
  • the app’s public/ directory served at the site root, with a 404 page,
  • TLS inferred from the app’s https/ directory.

Modules§

access
Answering “may this caller do this”, in the one grammar the whole framework uses.
admin
The admin dashboard: its manifest, and baking a static copy of it.
builtins
Functions the framework ships with.
cabi
Loading function libraries that speak the plain C ABI.
call
Invoking one function without serving anything — the apiplant call command, and what a Kubernetes CronJob runs.
email_auth
The endpoints that reach somebody through their mailbox.
functions
Loading and invoking dynamically-compiled function libraries.
hooks
Resource lifecycle hooks: running a named function around a CRUD operation.
queues
The subscriber: the loop that turns queued messages back into function calls.

Structs§

Options
How to boot.

Functions§

run
Boot the server for a loaded app and serve until shut down.
run_with
Boot the server for a loaded app, with boot-time options.