Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gustavocadev/rust-sea-orm-axum-crud
A simple example of Sea ORM + Sqlite + Axum REST API
https://github.com/gustavocadev/rust-sea-orm-axum-crud
axum crud-api rust sea-orm sqlite
Last synced: about 1 month ago
JSON representation
A simple example of Sea ORM + Sqlite + Axum REST API
- Host: GitHub
- URL: https://github.com/gustavocadev/rust-sea-orm-axum-crud
- Owner: gustavocadev
- Created: 2024-02-20T22:32:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-22T19:43:07.000Z (12 months ago)
- Last Synced: 2024-11-11T23:38:47.983Z (3 months ago)
- Topics: axum, crud-api, rust, sea-orm, sqlite
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A simple example about a Rest API written in Rust 🦀, axum, Sea ORM
## Setup
Rename the `.env.example` file to `.env`.
Create a migration file with(which means create a table in the database):
```bash
sea-orm-cli migrate up
```If you don't have `sea-orm-cli` installed, you can install it with:
```bash
cargo install sea-orm-cli
```## Run the server
```bash
cargo run
```Or for development you probably want to use `cargo-watch` crate
```bash
cargo-watch -x run
```if you don't have `cargo-watch` installed, you can install it with:
```bash
cargo install cargo-watch
```