A shorten URL service written in Rust.
This project is written in Rust, using Actix Web for web API service and Sea ORM for PostgreSQL database manipulation.
- Install Rust
- Clone the repo
- Run
cargo run
-
Start PostgreSQL. You can either run it on your local machine or use docker.
-
Install sea-orm-cli
Before execute the following command, you might need to create the
shorten_urldatabase manually.cargo install sea-orm-cli
-
Run migration command
sea-orm-cli migrate up
sea-orm-cli generate entity \
-u postgres://postgres:postgres@localhost:5432/shorten_url \
-o src/entitiesReplace the database URL with yours.