Prepare the database and run the server using the following commands:
DATABASE_URL=test.db diesel migration run
cargo run
When the server is started, try to send sign-in and sign-up requests:
curl -d "email=user@example.com&password=password" -X POST http://localhost:8001/signup
curl -d "email=user@example.com&password=password" -X POST http://localhost:8001/signin
The second request will return a response with a user identifier in JSON format that looks like this:
{"id":"08a023d6-be15-46c1-a6d6-56f0e2a04aae"}
Now we can try to implement another service with theĀ nickel crate.