To run the from localhost
port 8088
:
gleam run
To get precompiled erlang suitable for deployment:
gleam export erlang-shipment
If you want to test locally with DeployEx, run the following commands to create the release package:
export app_name=cochito
export release_path=erlang-shipment
cd build
tar -czvf ${release_path}/${app_name}-0.1.0.tar.gz ${release_path}
cp ${release_path}/${app_name}-0.1.0.tar.gz /tmp/${app_name}/dist/${app_name}
echo "{\"version\":\"0.1.0\",\"pre_commands\": [],\"hash\":\"local\"}" | jq > /tmp/${app_name}/versions/${app_name}/local/current.json
Currently the whole server just sits as a single file at src/cochito.gleam
, these are the main libraries being used:
- Gleam standard library, basic structs and functions.
- Gleam Erlang, access to processes, nodes, ports, etc.
- Gleam OTP, primitives for task, actor and supervisor.
- mist, a Gleam web server.
- Gleam HTTP, composable http middleware.
- nakai, generate HTML through Gleam.