xinnks / embedded-replicas-with-rust

A todo application built with Actix and Turso embedded replicas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedded replicas with Rust

A todo list example featuring Turso embedded replicas and Actix.

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:8080/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:8080/todos"

About

A todo application built with Actix and Turso embedded replicas

License:MIT License


Languages

Language:Rust 100.0%