Day 1 of using gleam. A simple TODO HTTP API application.
gleam add todo_app
import todo_app
pub fn main() {
// TODO: An example of the project in use
}
Further documentation can be found at https://hexdocs.pm/todo_app.
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
Run some commands:
curl -X POST \
http://localhost:8080/todos \
-H 'Content-Type: application/json' \
-d '{"message":"my new todo"}'
curl -X PUT \
http://localhost:8080/todos/0 \
-H 'Content-Type: application/json' \
-d '{"message":"first"}'
curl -X DELETE http://localhost:8080/todos/0
curl http://localhost:8080/todos
curl http://localhost:8080/todos/0