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-appwith your Cargo package name. Use the default binary name matching that package; see Packages for binary naming requirements. - Replace
WORKSPACE-IDwith 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 inhttp.bindsto 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.