This project is a web application built with Rust using the Actix framework. It leverages various libraries for web development, authentication, and database interaction.
Ensure you have the following installed on your system:
- Rust (stable version)
- Cargo (Rust's package manager)
- Git (for cloning the repository)
-
Navigate to the Project Directory
Change your current directory to the project directory:
cd server -
Install Dependencies
Run the following command to install the project dependencies:
cargo buildThis command will download and compile all the dependencies listed in
Cargo.toml.To run the application, use the following command:
cargo runThis command will compile and run your application. By default, the application will start on
http://localhost:8080.
To run the application in development mode, use the following command:
cargo watch -x run
-
Login to supabase
npx supabase login -
Link the project
npx supabase link --project-ref $PROJECT_ID -
Run docker desktop app
-
Start the database
npx supabase start
-
Create new migration
npx supabase migration new $MIGRATION_NAME -
Put your changes into created migration file in supabase/migrations folder
-
Apply the new migration to your local database
npx supabase migration upOr reset db and apply new migrationnpx supabase db reset -
Push changes to the remote database
npx supabase db push -
Update diesel schemas
diesel print-schema > src/schema.rs -
Update autogenerated models
diesel_ext --model > src/models.rs -s src/schema.rs
- Note: If you have an issue with utf-8 characters, you can try this command in powershell:
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
npx supabase db pull