RESTful Todo
RESTful Todo API with Actix and SeaORM. Documented by swagger-ui
Prerequisites
Usage
Clone the repository and run the following commands:
cargo run
Just like that, you have a RESTful API running on your machine.
Documentation
- The API documentation is available at http://localhost:8080/docs/swagger/
- The OpenAPI specification is available at http://localhost:8080/docs/openapi.json
Environment variables
Name | Description | Default |
---|---|---|
DATABASE_URL |
The database url | sqlite://db.sqlite3 |
SECRET_KEY |
The secret key for JWT | |
HOST |
The host to bind | localhost |
PORT |
The port to run the server | 8080 |
RATE_LIMIT_BURST_SIZE |
The burst size for rate limiter | 30 |
RATE_LIMIT_PER_SECOND |
The time to reset the burst | 60 |
API_CONTACT_NAME |
The name of the API contact | |
API_CONTACT_URL |
The url of the API contact | |
API_CONTACT_EMAIL |
The email of the API contact | |
API_TITLE |
The title of the API | RESTful Todo API documentation |
Soon
- Swagger UI for API documentation
- Rate limiting
- CI with Github Actions
- Unit tests
- Dockerize the server
- Makefile for easy setup, useing cargo-make
License
This project is licensed under the MIT License - see the LICENSE file for details