Just fooling around with ntex and sqlx
- ntex
- sqlx
- markup.rs
- Make sure Postgres and latest Rust are installed. (I'm using rustc 1.73.0 (cc66ad468 2023-10-03)). Probably any newish Postgres will work.
- Install sqlx_cli:
cargo install sqlx-cli
- Set the database url env variable, and run migrations:
DATABASE_URL=postgres://postgres@localhost/path-to-my-db
sqlx migrate
- Boot up a process in this repo's root directory:
DATABASE_URL=postgres://postgres@localhost/path-to-my-db cargo run
- Visit
localhost:8080
in your browser
-
Very WIP. Probably doesn't make sense. I'm just posting because I want help with something, and its easier to point to a repo than recreate on some forum.
-
You will have to manually create data in the db. First make a user row, then create some Todos based on that user id.