Crates.io | webservice_tutorial |
lib.rs | webservice_tutorial |
version | 1.0.3 |
source | src |
created_at | 2023-10-30 12:14:40.766143 |
updated_at | 2023-10-30 13:50:32.882133 |
description | Learn how to build a webservice in Rust! |
homepage | |
repository | https://github.com/harrisonhemstreet/webservice_tutorial_rust |
max_upload_size | |
id | 1018408 |
size | 124,666 |
This project serves as a comprehensive tutorial for building a web service using the Rust programming language. It covers various aspects, from setting up a PostgreSQL database to handling JSON responses.
.env
files.To generate documentation for this project:
cargo doc --open
Alternatively, you can find documentation for each crate on docs.rs.
Environment Variables: Copy the sample environment file and configure the variables.
cp env.example .env
Docker Compose: Start the Docker containers.
docker compose up -d
Test Routes: Open your browser or use a tool like Postman to hit the following route:
http://127.0.0.1:8080/blogs
http://localhost:16543
.test@test.com
test
For detailed instructions on adding a PostgreSQL server in PgAdmin4, refer to the PG Admin guide.
The init.sql
file contains the SQL statements that define the database schema. Feel free to explore it to understand the database structure.
The SKIP_AUTH
environment variable controls JWT authentication. Set it to true
to disable JWT during development.