Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sr2ds/blog-api-with-rust
- Owner: sr2ds
- Created: 2021-04-17T16:06:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-18T22:04:14.000Z (over 3 years ago)
- Last Synced: 2024-11-10T00:29:10.094Z (2 months ago)
- Topics: actix-web, mongodb, rust, rust-language
- Language: Rust
- Homepage:
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
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`