Skip to content

Files

Latest commit

author
David Silva
May 18, 2021
67e73dc · May 18, 2021

History

History
24 lines (16 loc) · 736 Bytes

Readme.md

File metadata and controls

24 lines (16 loc) · 736 Bytes

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

 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