A minimal REST API built using Rust and Actix Web to store and retrieve text notes.
- Create and view notes
- Simple JSON-based API
- In-memory storage using
Mutex - Built with Rust’s safety and performance guarantees
- Rust (1.80+) — Install via rustup
- Cargo (comes with Rust)
- Editor: VS Code + Rust Analyzer
# Clone this repository
git clone https://github.com/Skylar-Lorena/notes_api
cd notes_api
# Run the app
cargo runServer runs at: http://127.0.0.1:8080
Create a new note.
Request:
{
"id": 1,
"title": "My first note",
"content": "Learning Rust is fun!"
}Response: 201 Created
Retrieve all notes.
Response:
[
{ "id": 1, "title": "My first note", "content": "Learning Rust is fun!" }
]| Error | Solution |
|---|---|
Address already in use |
Stop previous instance or use another port |
serde not found |
Add serde to Cargo.toml with derive feature |
thread '<main>' panicked at 'unwrap' |
Replace with expect() or proper error handling |
error: linker 'cc' not found |
Install a C compiler (e.g., gcc) and ensure it's in your system PATH |
Built by Lorenah M. for the “New Stack Learning” mini-project using GenAI for setup, debugging, and documentation.