{"id":25080151,"url":"https://github.com/sitetester/sync-point","last_synced_at":"2025-09-10T04:13:01.535Z","repository":{"id":270492474,"uuid":"904867772","full_name":"sitetester/sync-point","owner":"sitetester","description":"Small web service with one endpoint: /wait-for-second-party/:unique-id  which allows two parties to sync within a time limit","archived":false,"fork":false,"pushed_at":"2025-01-03T11:48:30.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T03:18:10.640Z","etag":null,"topics":[],"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/sitetester.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":"2024-12-17T17:47:30.000Z","updated_at":"2025-01-05T17:18:16.000Z","dependencies_parsed_at":"2024-12-31T16:36:48.537Z","dependency_job_id":null,"html_url":"https://github.com/sitetester/sync-point","commit_stats":null,"previous_names":["sitetester/sync-point"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsync-point","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsync-point/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsync-point/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitetester%2Fsync-point/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sitetester","download_url":"https://codeload.github.com/sitetester/sync-point/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586099,"owners_count":20801026,"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":[],"created_at":"2025-02-07T03:18:20.519Z","updated_at":"2025-04-01T04:39:35.642Z","avatar_url":"https://github.com/sitetester.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nIt's small web service with one endpoint: `/wait-for-second-party/:unique-id`  \nThis endpoint allows two parties to sync. When one party makes a POST request, the response will be delayed until the second party requests the same URL.\nIn other words, the first party is blocked until the second party arrives or a timeout occurs (e.g., 10 seconds).\n\n\n### Setup\n- `cargo run` (it will install dependencies \u0026 start Rocket web server). Example output\n```aiignore\n[2024-12-28T06:41:51Z WARN  rocket::launch] 🚀 Rocket has launched from http://127.0.0.1:8000\n```\n\n---\n\n### Testing\n**via CURL**\n- curl -X POST http://127.0.0.1:8000/wait-for-second-party/123 (from one terminal tab/window)\n- curl -X POST http://127.0.0.1:8000/wait-for-second-party/123 (from another terminal tab/window) \n\nIf both parties join within the `timeout` duration (10 sec), it should return such JSON responses\n```aiignore\n{\"status\":\"success\",\"message\":\"Welcome! (first party)\"}\n{\"status\":\"success\",\"message\":\"Welcome! (second party)\"}\n```\nbut if only one party tries to join, then the timeout response should be\n```aiignore\n{\"status\":\"timeout\",\"message\":\"Request timed out\",\"timeout_duration_sec\":10}\n```\n\n**via cargo test**  \n2 types of tests are provided. Unit \u0026 Integration\n- `src/api/app_state.rs` functionality is tested via unit tests, hence tests are provided in the same file.\n- `tests/api.rs` while this file contains integration tests, covering different scenarios.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fsync-point","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitetester%2Fsync-point","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitetester%2Fsync-point/lists"}