This project utilizes Diesel for migrations and provides an endpoint accessible via Basic Authorization.
-
Clone this repository:
$ git clone https://github.com/4prndz/rocket-posts-endpoint
-
Run migrations:
$ diesel migration run --database-url ./database.sqlite
-
Run the project:
$ cargo run
To access the endpoint, you need to use Basic Authorization by providing your login credentials encoded in base64.
Example using cURL:
$ curl -Ss http://localhost:8000/posts -H 'Authorization: Basic NHBybmR6OmtvdWljaGkNCg=='