{"id":21361880,"url":"https://github.com/mxssl/hello-world","last_synced_at":"2025-03-16T06:45:17.132Z","repository":{"id":96800531,"uuid":"173988191","full_name":"mxssl/hello-world","owner":"mxssl","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-05T17:15:47.000Z","size":271,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T19:21:31.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mxssl.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":"2019-03-05T17:09:50.000Z","updated_at":"2019-03-08T21:39:46.000Z","dependencies_parsed_at":"2023-04-05T10:01:16.703Z","dependency_job_id":null,"html_url":"https://github.com/mxssl/hello-world","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fhello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fhello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fhello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxssl%2Fhello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxssl","download_url":"https://codeload.github.com/mxssl/hello-world/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835930,"owners_count":20355611,"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":"2024-11-22T06:12:27.460Z","updated_at":"2025-03-16T06:45:17.125Z","avatar_url":"https://github.com/mxssl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hello-world\n\n## Роуты\n\n`/` - отвечает кодом 200 и строкой `Hello World!`\n\n`/health-check` - отвечает кодом 200\n\n`/ready-check` - отвечает кодом 200\n\n`/metrics` - отвечаем кодом 200, показывает метрики в формате prometheus. Кастомная метрика всего одна - `http_total_requests` - показывает общее кол-во запросов на `/` роут.\n\n## Запуск локально\n\n### Зависимости\n\nВ системе должны быть установлены:\n\n- [docker](https://docs.docker.com/install)\n- [docker-compose](https://docs.docker.com/compose/install)\n\n### Запускаем docker-compose\n\n```bash\nmake up\n```\n\nИли в detach режиме\n\n```bash\ndocker-compose up -d\n```\n\nДалее приложение доступно на локальном порту `8080`\n\n```bash\ncurl localhost:8080\nHello World!\n```\n\nPrometheus доступен на локальном порту `9090`:\n\n[prometheus](http://localhost:9090)\n\nGrafana доступна на локальном порту `3000`:\n\n[grafana](http://localhost:3000)\n\n```text\nL: admin\nP: admin\n```\n\nВ grafana доступен дашборд App с несколькими графиками по метрикам приложения (процессор, память, горутины, общее кол-во http запросов).\n\n## Kubernetes\n\nЗапуск приложения в Kubernetes\n\n```bash\nmake kubernetes\n```\n\nПосмотреть Kubernetes манифесты можно в директории `kube`\n\n## Запуск тестов\n\n### Запуск юнит тестов приложения в golang контейнерe\n\n```bash\nmake docker-test\n```\n\n### Запуск тестов контейнерезации\n\nЗависимости:\n\n- [dgoss](https://github.com/aelsabbahy/goss/tree/master/extras/dgoss)\n\nЗапуск `dgoss` тестов\n\n```bash\nmake dgoss\n```\n\nОзнакомиться с конфигурацией `dgoss` можно в файле `goss.yaml`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxssl%2Fhello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxssl%2Fhello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxssl%2Fhello-world/lists"}