Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sr2ds/blog-api-with-rust

Blog API - With Rust - Actix
https://github.com/sr2ds/blog-api-with-rust

actix-web mongodb rust rust-language

Last synced: 4 days ago
JSON representation

Blog API - With Rust - Actix

Awesome Lists containing this project

README

        

# Blog API - Writing in Rust with Actix Web

This Repository is only one practice project with Rust Language. I'm use Actix Web Framework and MongoDB.

MongoDB ODM: https://crates.io/crates/wither

Actix Web: https://actix.rs/

The CRUD operator is full work for articles, the routes have resource pattern with Restfull methods GET POST PUT DELETE.

### Store one article

```sh
curl -X POST --header "Content-Type: application/json" --data \
'{"author":"David","title":"Rust Blog Article","created_at":"2021-04-15","content":"blank"}' \
http://localhost:8080/articles
```
## Setup Dev

## MongoDB - Docker Container
`docker run -d -p 27017:27017 -v `pwd`/data/db:/data/db --name blogApiRust mongo`

## Run
`cargo watch -x run`