Hi there, this is a toy project to experiment building a simple blog CRUD application with Rust, Axum and MongoDB. This project provides a simple API for adding users and articles, and view/read all the articles as well The goal of this project is completely educational, feel free to use it however you want.
๐จ It's still a work in progress. ๐ค ๐ป
I recommend using docker and docker compose to try the project, but feel free to use the other method as well.
- โ Add Article
- โ Add User
- โ View Articles
- โณ Delete Article
- โณ Authentication
You need to have docker and docker comopse installed.
- Install docker Official Documentation
- Install docker compose Official Documentation
- After installation, run the following command to start the server and the database containers
- Test the server on http://localhost:3000/
You need to have rust and MongoDB installed.
- Run the following command to install Rust:
NOTE: If you find the command sketchy, please head to the official website and check for yourself ๐
- Install MongoDB (Community Edition) Official Documentation
- Check that the mongodb server is running locally, for example, on Mac OS run:
- If the server is in the started status then everything should be fine.
NOTE: Check the docs for linux and windows.
- Head to the project directory and run the web server
curl -X POST -H "Content-Type: application/json" -d '{
"title": "Title goes here", \
"body": "article body goes here" \
}' http://localhost:3000/api/article`
curl http://localhost:3000/api/list