This repository contains an implementation of the fission webserver, an implementation of a CLI that allows interacting with the webserver.
fission-server
: Contains the webserver implementation and two binaries, one for running the webserver, one for generating an openAPI document.fission-cli
: Contains the CLI implementation, its binary is the CLI.fission-core
: Contains code that can be shared between CLI and server, such as request/response types.The dependencies between the crates in this workspace look like this:
flowchart TD
fission-server --> fission-core
fission-cli --> fission-core
nix run . -- --config-path ./fission-server/config/settings.toml
$ pg_ctl -o '-k /tmp' -D "./.pg" start
$ cargo run -p fission-server -- --config-path ./fission-server/config/settings.toml
You can drop into a development shell, if you have nix installed via
$ nix develop
from the project root.
You can re-build and re-run the webserver on every file change via cargo watch
:
$ cargo watch -c -s "cargo run -p fission-server -- -c ./fission-server/config/settings.toml"
In production, you may want to enable the --no-colors
flag on the executable.
All CLI flags are also available as environment-variables, so FISSION_SERVER__NO_COLORS=true
and FISSION_SERVER__CONFIG_PATH="./prod-settings.toml"
or even values from the settings.toml
file itself. Double underscores are used as a separator between settings keys, because these can contain underscores themselves.
You'll also want to set server.environment = "prod"
in settings.toml
, and with that you'll need to provide a valid mailgun.api_key
(can also be set as the environment variable FISSION_SERVER__MAILGUN__API_KEY=...
).