Template repository to get up and running quickly with the Athena Framework which includes:
- A flexible directory structure
- Pre-configured binary entrypoints for HTTP and CLI contexts
- Development code-quality/testing dependencies + CI
- Minimal runnable Athena Framework application
- Generate a new repository using this template.
- Install the system dependencies, such as
libmagic - Run
shards install - Rename
MyAppmodule withinsrc/main.crandsrc/controllers/example_controller.crto your desired name - Rename
skeletonshard name withinshard.ymlto your desired name - Update
./LICENSEwith your desired name/email - Consider pinning
crate-ci/typosin.github/workflows/ci.ymlto a specific version to avoid random failures as new dictionaries are published - Start creating your application!
Besides the framework itself, the template includes the Console component, whose bundle is registered in src/main.cr to support the CLI entrypoint and src/commands/.
Other components, such as the Validator, are optional; see Optional Components for how to add them.
The template repository includes build targets for both the HTTP and CLI contexts.
Or in other words, ./bin/console and ./bin/server binaries are created by running shards build.
This makes it easy to deploy both parts of the application independently from one another.
TIP: The
shards runcommand may be used during development to interact with each target. E.g.shards run serverto start the server andshards run console -- debug:routerto execute console commands.