{"id":20078764,"url":"https://github.com/wpdas/blog-api-rust","last_synced_at":"2026-05-01T21:01:19.028Z","repository":{"id":172331236,"uuid":"644091816","full_name":"wpdas/blog-api-rust","owner":"wpdas","description":"This is an API developed with Rust, Rocket \u0026 Diesel and was created in order to study Rust. Therefore, the code might not be one of the best since I'm still a noob :D.","archived":false,"fork":false,"pushed_at":"2023-06-04T00:09:55.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T13:14:49.121Z","etag":null,"topics":["api","diesel","docker","rocket","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpdas.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-22T19:52:08.000Z","updated_at":"2023-06-04T00:10:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d898669a-fa42-4b1f-8604-45c405e520d7","html_url":"https://github.com/wpdas/blog-api-rust","commit_stats":null,"previous_names":["wpdas/blog-api-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpdas/blog-api-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fblog-api-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fblog-api-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fblog-api-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fblog-api-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpdas","download_url":"https://codeload.github.com/wpdas/blog-api-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpdas%2Fblog-api-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","diesel","docker","rocket","rust"],"created_at":"2024-11-13T15:16:32.754Z","updated_at":"2026-05-01T21:01:19.001Z","avatar_url":"https://github.com/wpdas.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Api - Rust\n\nThis is an API developed with Rust, Rocket \u0026 Diesel and was created in order to study Rust. Therefore, the code might not be one of the best since I'm still a noob :D.\n\n## Executing\n\n2 - Install `diesel` if you haven't yet:\n\n```sh\ncargo install diesel_cli --no-default-features --features postgres\n```\n\n3 - Run the container:\n\n```sh\ndocker compose up\n```\n\n4 - Create the tables:\n\n```sh\ndiesel migration run\n```\n\n5 - Run the app:\n\n```sh\ncargo run\n```\n\n## Postman\n\nPosting a new content.\n\n**POST:** `http://localhost:8000/post`\n\nBody example:\n\n```json\n{\n  \"title\": \"My First Post\",\n  \"body\": \"The awesome body of my first post! :D\"\n}\n```\n\nFetching posts.\n\n**GET:** `http://localhost:8000/posts`\n\n## Good to know\n\nIf you face the `Id: library not found for -lpq`. Access [this site](https://stackoverflow.com/questions/70313347/ld-library-not-found-for-lpq-when-build-rust-in-macos) to get to know how to fix it.\n\n### Tips\n\n`diesel setup`: Initializes the migrations setup for diesel\n\n`diesel migration generate posts`: Generates posts migration table\n\n`diesel migration run`: Runs migration codes\n\n`diesel migration redo`: It's going to execute the down.sql and up.sql file again in order to redo the migration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Fblog-api-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpdas%2Fblog-api-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpdas%2Fblog-api-rust/lists"}