locus

Configuration (Locus.toml)

Your project’s configuration is managed in a single file named Locus.toml at the root of your source directory. This file uses the TOML format, which is designed to be simple and easy to read.

[app] Section

This section contains general information about your application.

Keys:

Example:

[app]
name = "My Awesome App"

[auth] Section

This section configures the authentication and authorization features of your application.

Keys:

Example:

[auth]
# It's recommended to use an environment variable for the secret
jwtSecret = "your-super-secret-key-here"
adapter = "./authAdapter.js"
requireAuth = true

[deploy.ENVIRONMENT] Section

You can define settings for different deployment environments, like staging or production. The locus deploy <environment> command uses the corresponding section.

Keys:

Example:

# Settings for the 'production' environment
[deploy.production]
platform = "vercel"
backend_platform = "railway"
# database_url is best set via an environment variable on your host

[performance] Section

This section allows you to fine-tune performance-related settings, particularly for plugins.

Keys:

Example:

[performance]
pluginHookWarnMs = 100
pluginTimeoutMs = 5000