Compiling and running

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 protected]&password=password" -X POST http://localhost:8001/signup
curl -d "[email protected]&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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.117.212