{"id":19495291,"url":"https://github.com/edandresvan/practice-book-rust-servers-services-apps","last_synced_at":"2026-06-11T04:31:38.045Z","repository":{"id":155813153,"uuid":"587910397","full_name":"edandresvan/practice-book-rust-servers-services-apps","owner":"edandresvan","description":"Practical exercises from the book «Rust Servers, Services, and Apps» by Prabhu Eshwarla (Manning).","archived":false,"fork":false,"pushed_at":"2023-06-09T13:14:57.000Z","size":2347,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T09:25:19.403Z","etag":null,"topics":["practice","practice-programming","programming","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edandresvan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T21:50:47.000Z","updated_at":"2023-06-09T03:00:01.000Z","dependencies_parsed_at":"2024-11-10T21:37:07.311Z","dependency_job_id":"ecb62019-086b-41b0-959b-22a56ce55b50","html_url":"https://github.com/edandresvan/practice-book-rust-servers-services-apps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandresvan%2Fpractice-book-rust-servers-services-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandresvan%2Fpractice-book-rust-servers-services-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandresvan%2Fpractice-book-rust-servers-services-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edandresvan%2Fpractice-book-rust-servers-services-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edandresvan","download_url":"https://codeload.github.com/edandresvan/practice-book-rust-servers-services-apps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240740975,"owners_count":19850071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["practice","practice-programming","programming","rust","rust-lang"],"created_at":"2024-11-10T21:36:52.125Z","updated_at":"2026-06-11T04:31:38.039Z","avatar_url":"https://github.com/edandresvan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":" Practice Book: Rust Web Development\n\n\nThis repository contains my practical exercises from the book [\"Rust Servers, Services, and Apps\" by Prabhu Eshwarla (Manning)](https://www.manning.com/books/rust-servers-services-and-apps).\n\n\n![Book Cover](https://images.manning.com/360/480/resize/book/9/03ac487-c409-4b45-ac49-8affc8b524fe/Eshwarla-RSSA-MEAPHI.png)\n\nThe original code repository is also located [here in GitHub](https://github.com/peshwar9/rust-servers-services-apps).\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\nThe files in this repository are my own practice following the book lessons.\n\nHowever, the original copyright belongs to Manning Books.\n\nEshwarla, Prabhu. 2023. Rust Servers, Services, and Apps. Manning Publications. ISBN: 9781617298608\n\n## PostgreSQL Installation\n\nFrom chapter 4, a PostgreSQL database is used as the datastore for the web service. To install PostgreSQL using a [Podman](https://podman.io/) container and Ubuntu 22.04 follow these steps:\n\n### Install Podman\n\n```bash\n$ sudo apt-get install aptitude;\n$ sudo aptitude update \u0026\u0026 sudo aptitude upgrade -y;\n$ sudo aptitude install podman;\n```\n\n### Install PostgreSQL Clients\n\n```bash\n\n$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql.gpg;\n$ sudo sh -c 'echo \"deb [signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main\" \u003e /etc/apt/sources.list.d/postgresql.list';\n\n$ wget --quiet -O - https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg;\n\n$ sudo sh -c 'echo \"deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main\" \u003e /etc/apt/sources.list.d/pgadmin4.list';\n \n$ sudo aptitude update \u0026\u0026 sudo aptitude upgrade -y;\n\n$ sudo aptitude install libpq-dev postgresql-client pgadmin4-desktop -y;\n```\n\n### Install a PostgreSQL Container\n\nWe will use the PostgreSQL container based on Debian Linux from the Docker Registry.\n\nCreate a disk volume (i.e. a directory) to persist the database we will maintain in the container.\n\n```bash\n$ podman volume create ezytutors_volume;\n```\n\nCreate the PostgreSQL container with the previously created disk volume and the customizable parameters. The first time, we specify the `root` password.\n\n```bash\n$ podman run --interactive --publish 5432:5432 --volume ezytutors_volume:/var/lib/postgresql/data --memory 500m --env POSTGRES_PASSWORD=myP4ssw0rd --name ezytutors docker.io/library/postgres:15-bullseye;\n```\n\n### Create the PostgreSQL Database for the EzyTutors Service (Back-end)\n\n```bash\n$ psql --host=localhost --port=5432 --username=postgres --password;\n\n\npostgres=# create database ezytutors_db;\npostgres=# create user truuser with password 'mypassword';\npostgres=# grant all privileges on database ezytutors_db to truuser;\npostgres=# \\q\n\n```\n\n```bash\n$ psql --host=localhost --port=5432 --dbname=ezytutors_db --username=truuser --password;\n```\n\n### Create the PostgreSQL Database for the SSR Front-end\n\n```bash\n$ psql --host=localhost --port=5432 --username=postgres --password;\n\n\npostgres=# create database ezytutors_web_ssr_db;\npostgres=# create user ssruser with password 'mypassword';\npostgres=# grant all privileges on database ezytutors_web_ssr_db to ssruser;\npostgres=# \\q\n\n```\n\n```bash\n$ psql --host=localhost --port=5432 --ezytutors_web_ssr_db --username=ssruser --password;\n```\n\n### Execute PostgreSQL Scripts\n\n```bash\n$ cd src/db-scripts;\n$ psql --host=localhost --port=5432 --dbname=ezytutors_db --username=truuser --password --file=src/database.sql;\n``` \n\n```bash\n$ cd src/db-scripts;\n$ psql --host=localhost --port=5432 --user=truuser --dbname=ezytutors_db --file=db-create.sql\n```\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedandresvan%2Fpractice-book-rust-servers-services-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedandresvan%2Fpractice-book-rust-servers-services-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedandresvan%2Fpractice-book-rust-servers-services-apps/lists"}