{"id":39357130,"url":"https://github.com/codeitlikemiley/poem-api","last_synced_at":"2026-01-18T02:38:42.583Z","repository":{"id":276799871,"uuid":"930367997","full_name":"codeitlikemiley/poem-api","owner":"codeitlikemiley","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-10T14:36:24.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T14:42:45.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codeitlikemiley.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":"2025-02-10T14:22:55.000Z","updated_at":"2025-02-10T14:36:28.000Z","dependencies_parsed_at":"2025-02-10T14:42:50.801Z","dependency_job_id":"43b2eee9-c9ba-498f-90ac-5b893126c93e","html_url":"https://github.com/codeitlikemiley/poem-api","commit_stats":null,"previous_names":["codeitlikemiley/poem-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeitlikemiley/poem-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeitlikemiley%2Fpoem-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeitlikemiley%2Fpoem-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeitlikemiley%2Fpoem-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeitlikemiley%2Fpoem-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeitlikemiley","download_url":"https://codeload.github.com/codeitlikemiley/poem-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeitlikemiley%2Fpoem-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":[],"created_at":"2026-01-18T02:38:42.462Z","updated_at":"2026-01-18T02:38:42.562Z","avatar_url":"https://github.com/codeitlikemiley.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust - Poem Open API Starter Server\n\nBuild your server with Rust using [poem](https://docs.rs/poem-openapi/5.1.5/poem_openapi/) framework. \n\n## Requirements\n\nTo build and run this project, you need the following:\n\n- **Rust**: [Install Rust](https://www.rust-lang.org/tools/install)\n\nThe project uses a specific version of Rust, which is managed automatically using [rustup](https://rustup.rs/). Check the `rust-toolchain.toml` file for the exact version.\n\n## Installation\n\n### Prerequisites\n\n1. **Install Rust**: If you don't have Rust installed, you can install it with the following command:\n\n   ```bash\n   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n   ```\n\n2. **Clone the Repository**:\n\n   ```bash\n   git clone https://github.com/codeitlikemiley/poem-api.git\n   cd poem-api\n   ```\n\n3. **Set the Rust Toolchain**:\n\n   ```bash\n   rustup update\n   ```\n\n### Development\n\n1. **Cargo Watch** with `cargo-watch`\n\n   - Install cargo-watch\n\n   ```sh\n   cargo install cargo-watch\n   ```\n\n   - Run Command:\n\n   ```bash\n   cargo watch -x run\n   ```\n\n   Note: This auto re-compiles the executable and re-run the server\n\n### Running The Server\n\n1. **Running the Server**:\n\n   ```bash\n   cargo run\n   ```\n\n   \u003e By Default `cargo run` uses `.env.example` ENV Variable\n\n   ```env\n   PORT=3000\n   HOST=127.0.0.1\n   APP_SECRET=secret \n   ```\n\n\n   \u003e NOTE: If you need to use other `PORT` you can pass in it as an ENV Variable\n\n   ```bash\n   PORT=8000 cargo run\n   ```\n\n### Running in Production\n\n1. Build Release\n\n   ```bash\n   cargo build --release\n   ```\n2. Run in Production\n\n   ```bash\n   APP_ENV=prod PORT=3001 APP_SECRET=SomeRandomString HOST=localhost ./target/release/poem-api\n   ```\n\n\n### Authorizing with JWT on Swagger UI\n\n1. **Open Swagger UI and Test the API**:\n\n   ```bash\n   open http://localhost:3000/docs\n   ```\n\n2. **Login with username**\n\n\n```json\n{\n    \"username\": \"codeitlikemiley@gmail.com\"\n}\n````\n\n\u003cimg width=\"1512\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5521c2c4-a286-4254-aaa4-3344c4313b8f\" /\u003e\n\n3. Authorization\n\n \n\u003e Copy Paste the **token** response from **`Login`** \n\nThen Go to  any Locked Endpoint with a lock Icon \n\nClick the Lock Icon , it would show a Modal , where you can paste the **token**\n\n\n\u003cimg width=\"1512\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9a1fc09d-dcb1-4133-a026-dedc4aa81c29\" /\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeitlikemiley%2Fpoem-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeitlikemiley%2Fpoem-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeitlikemiley%2Fpoem-api/lists"}