Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Axum Todo List

A todo list example featuring Turso and Axum.

Development

Create a turso database.

turso db create <db-name>

Get the database credentials:

# db url
turso db show --url <db-name>

# authentication token
turso db tokens create <db-name>

Store the credentials inside a .env file:

TURSO_DATABASE_URL
TURSO_AUTH_TOKEN

Run project

cargo run

Add a new task:

curl "http://127.0.0.1:3000/todos" \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"task": "Do task m"}'

Get the list of added tasks:

curl "http://127.0.0.1:3000/todos"