5 unstable releases
0.3.1 | Nov 5, 2021 |
---|---|
0.3.0 | Oct 15, 2021 |
0.2.1 | Aug 27, 2021 |
0.2.0 | Aug 13, 2021 |
0.1.0 | Aug 2, 2021 |
#2648 in Database interfaces
38 downloads per month
42KB
956 lines
RP1
RP1 provides an easy way to quickly create a basic API using Diesel and Rocket (v0.5). Using a macro attribute on a struct RP1 generates basic REST-like API endpoints for CRUD operations.
The goal of RP1 is to get a working API layer for your application with as little effort as possible while also remaining versatile. Don't want to use our generated code? It should be easy to disable or replace part of our generation without having to completely discard it. It should also be possible to re-use some parts of RP1 in your own application, even if you don't use the generated routes.
Writing an application using RP1 starts by defining your database schema using diesel. Based on this schema and a model struct (one that would in normal diesel usage only be intended for querying) RP1 will generate some routes and handlers that you can directly plug into your rocket application. To get started yourself, you should start with the crate level documentation in the generated docs.
Feedback and improvement
Have any suggestions or made some (small) improvement? Do let us know!
Dependencies
~18–50MB
~857K SLoC