Skip to content
Menu
Documentation2. Configure your app
Getting started

2. Configure your app

Create leilani.json beside Cargo.toml. For an application named my-app listening on port 3000, start with:

{
  "packages": {
    "my-app": {
      "args": []
    }
  },
  "http": {
    "binds": {
      "WORKSPACE-ID.aloha.leilani.dev": 3000
    }
  }
}
  • Replace my-app with your Cargo package name. Use the default binary name matching that package; see Packages for binary naming requirements.
  • Replace WORKSPACE-ID with your workspace ID. This hostname is your application's public address.
  • Make your application listen on 0.0.0.0:3000, or change both the application's listening port and the port in http.binds to match. The configuration maps requests to a port; it does not set your application's listener.

args supplies command-line arguments to the package. This minimal configuration adds no access-control rules, so the application is public. Keep secrets out of source control.