Static Directory

An Atmo project can optionally contain a static directory. When present, the subo CLI will package the static directory into your application Bundle. Example:

-- get-users
-- create-user
-- static
-- index.html
-- main.css
-- bundle.js
-- Directive.yaml

Do not use the static directory for sensitive data such as secrets. Atmo will be gaining a secrets management system in 2021.

Since the directory is included in your Bundle, your Runnables can access the files! Atmo will mount the directory as a read-only filesystem that can be accessed using the file namespace of the Runnable API. For example:

use suborbital::file;
let indexHtml = file::get_static("index.html");

This allows Atmo to serve static sites, access template files, and more!