Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```