Launching your app in development mode
To run your app, from the project root, run:modus dev
command compiles your app code, starts a local server, and
provides a URL to access your app’s API. It also enables fast refresh, which
automatically recompiles and reloads any changed functions while preserving app
state during development.
Once your app is running, you can access the graphical interface for your API at
the URL located in your terminal.

Environment secrets
When you run your app locally usingmodus dev
, the runtime replaces the
placeholders of the manifest with values from environment variables defined in
your operating system or in .env
files.
The environment variables keys must be upper case and follow the naming
convention:
MODUS_<CONNECTION NAME>_<PLACEHOLDER>
For example, with the following manifest:
modus.json
{{API_KEY}}
with the value of the environment
variable MODUS_OPENAI_API_KEY
An easy way to define the environment variables when working locally is to use
the file .env.dev.local
located in your app folder.
For the previous manifest, we can set the key in the .env.dev.local file as
follow:
.env.dev.local
You should exclude
.env
files from source control. Projects created with
modus new
exclude these files automatically when creating your project.