1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00
examples/sqlx_todo
2020-09-12 16:49:45 +01:00
..
src v3 examples (#364) 2020-09-12 16:49:45 +01:00
.env.example Simple Todo API using actix-web and sqlx with postgresql database (#303) 2020-04-23 17:03:04 +09:00
.gitignore Simple Todo API using actix-web and sqlx with postgresql database (#303) 2020-04-23 17:03:04 +09:00
Cargo.toml v3 examples (#364) 2020-09-12 16:49:45 +01:00
README.md Simple Todo API using actix-web and sqlx with postgresql database (#303) 2020-04-23 17:03:04 +09:00
schema.sql Simple Todo API using actix-web and sqlx with postgresql database (#303) 2020-04-23 17:03:04 +09:00

actix-sqlx-todo

Example Todo application using Actix-web and SQLx with posgresql

Usage

Prerequisites

  • Rust
  • PostgreSQL

Change into the project sub-directory

All instructions assume you have changed into this folder:

cd examples/sqlx_todo

Set up the database

  • Create new database using schema.sql
  • Copy .env-example into .env and adjust DATABASE_URL to match your PostgreSQL address, username and password

Run the application

To run the application execute:

cargo run

By default application will be available on http://localhost:5000. If you wish to change address or port you can do it inside .env file