We’ll use jets new to generate a new Jets project.
jets new demo --mode job
--mode job option generates a Jets project designed for jobs.
❯ jets new demo --mode job
The project structure is nice and lightweight for job mode. For more information about the folders, see Project Structure.
Let’s take a look at the starter application config. It looks something like this:
class Application < Jets::Application
config.project_name = "demo"
config.mode = "job"
config.prewarm.enable = false
The project_name will be used when we deploy this project. The project that is deployed will have the environment added, IE:
demo-dev. Since this app is for jobs, prewarming is set to false.
You can override settings for each environment with the files in
config.cache_classes = false
config.eager_load = false
config.logging.event = false
For more settings see the Config Reference.
Next, we’ll explore project files and write some code.