{"id":17248314,"url":"https://github.com/sonichigo/mux-sql","last_synced_at":"2025-10-28T17:03:29.785Z","repository":{"id":243817466,"uuid":"813536281","full_name":"Sonichigo/mux-sql","owner":"Sonichigo","description":"A Demo setup on how devpod can be used with Keploy","archived":false,"fork":false,"pushed_at":"2025-02-22T05:15:03.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T01:33:57.596Z","etag":null,"topics":["devcontainer","devpod","keploy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Sonichigo.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-06-11T09:14:15.000Z","updated_at":"2025-02-22T05:15:25.000Z","dependencies_parsed_at":"2024-06-11T10:43:23.356Z","dependency_job_id":"0bc78cb9-f24c-4235-b10e-0be16b0cc586","html_url":"https://github.com/Sonichigo/mux-sql","commit_stats":null,"previous_names":["sonichigo/devpods-keploy-demo","sonichigo/devpod-keploy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonichigo%2Fmux-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonichigo%2Fmux-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonichigo%2Fmux-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sonichigo%2Fmux-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sonichigo","download_url":"https://codeload.github.com/Sonichigo/mux-sql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605709,"owners_count":20643030,"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":["devcontainer","devpod","keploy"],"created_at":"2024-10-15T06:40:43.214Z","updated_at":"2025-10-28T17:03:29.780Z","avatar_url":"https://github.com/Sonichigo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MUX-SQL\r\n\r\nThis is a sample application that uses the `gorilla/mux` router and `Postgres` for database operations. The application is a simple product catalog that allows you to add products, fetch all products, and fetch a single product. \r\n\r\n## Installation Setup\r\n\r\n```bash\r\ngit clone https://github.com/keploy/samples-go.git \u0026\u0026 cd samples-go/mux-sql\r\ngo mod download\r\n```\r\n\r\nUsing the docker-compose file we will start our postgres instance:-\r\n\r\n```bash\r\n# Start Postgres\r\ndocker-compose up -d postgres\r\n```\r\n\r\n### Update the Host\r\n\r\n\u003e **Since we have setup our sample-app natively set the host to `localhost` on line 10.**\r\n\r\n### Capture the Testcases\r\n\r\nNow, we will create the binary of our application:-\r\n\r\n```zsh\r\ngo build -cover\r\n```\r\n\r\n### 1. Generate shortned url\r\n\r\n```bash\r\ncurl --request POST \\\r\n  --url http://localhost:8010/product \\\r\n  --header 'content-type: application/json' \\\r\n  --data '{\r\n    \"name\":\"Bubbles\", \r\n    \"price\": 123\r\n}'\r\n```\r\nthis will return the response. \r\n```\r\n{\r\n    \"id\": 1,\r\n    \"name\": \"Bubbles\",\r\n    \"price\": 123\r\n}\r\n```\r\n\r\n### 2. Fetch the Products\r\n```bash\r\ncurl --request GET \\\r\n  --url http://localhost:8010/products\r\n```\r\n\r\nwe will get output:\r\n\r\n```json\r\n[{\"id\":1,\"name\":\"Bubbles\",\"price\":123},{\"id\":2,\"name\":\"Bubbles\",\"price\":123}]\r\n```\r\n\r\n### 3. Fetch a single product\r\n\r\n```sh\r\ncurl --request GET \\\r\n  --url http://localhost:8010/product/1\r\n\r\nwe will get output:-\r\n```json\r\n{\"id\":1,\"name\":\"Bubbles\",\"price\":123}\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonichigo%2Fmux-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonichigo%2Fmux-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonichigo%2Fmux-sql/lists"}