January 2019
Intermediate to advanced
520 pages
14h 32m
English
To run this example, we need a PostgreSQL database instance. The simplest way to run it is to start a Docker container. We already did that in Chapter 7, Reliable Integration with Databases, where we studied how to use Rust with databases. You can start a new container with a PostgreSQL database instance using the following command:
docker run -it --rm --name test-pg -p 5432:5432 postgres
When the container is started, run the example server we wrote in this section with the cargo run command. It prints after compilation and the server is ready to accept requests:
Listening for requests at http://127.0.0.1:7878
Now you can use the link provided to log visits from your browser. If it is configured successfully, you will ...
Read now
Unlock full access