Skip to content

turso-extended/app-turso-axum-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turso + 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"

About

A simple example showing how to use Turso in Axum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages