Akshat-Vashisht / sqlx-crud

Simple CRUD operations using sqlx and postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRUD using sqlx and Postgres

Simple Rust code to perform CRUD operations

Setting up the project

  1. Clone the repository
  2. Create a .env file in the root directory and add the following data to it
DATABASE_URL=postgres://<username>:<password>@<host>/<db_name>
  1. Install sqlx-cli using cmd
cargo install sqlx-cli
  1. Create the db using sqlx-cli
sqlx database create
  1. Run the migrations
sqlx migration run 
  1. Run the cargo file
cargo run

About

Simple CRUD operations using sqlx and postgres


Languages

Language:Rust 100.0%