mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
e188d612c2
Co-authored-by: Rob Ede <robjtede@icloud.com> |
||
---|---|---|
.. | ||
src | ||
.env.example | ||
.gitignore | ||
Cargo.toml | ||
README.md | ||
schema.sql |
actix-sqlx-todo
Example Todo application using Actix-web and SQLx with sqlite
Usage
Prerequisites
- Rust
- SQLite
Change into the project sub-directory
All instructions assume you have changed into this directory:
$ cd database_interactions/sqlx_todo
Set up the database
- Create new database using
schema.sql
- Copy
.env.example
into.env
and adjustDATABASE_URL
to match your SQLite address, if needed
cat schema.sql | sqlite3 test.db
cp .env.example .env
Run the application
To run the application execute:
cargo run
By default application will be available on http://localhost:8080
. If you wish to change address or port you can do it inside the .env
file