{"id":17822199,"url":"https://github.com/samuelschlesinger/haskell-server-template","last_synced_at":"2025-08-19T03:05:46.999Z","repository":{"id":88731970,"uuid":"304977847","full_name":"SamuelSchlesinger/haskell-server-template","owner":"SamuelSchlesinger","description":"A template for Haskell HTTP servers.","archived":false,"fork":false,"pushed_at":"2020-10-19T18:48:44.000Z","size":1419,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T10:33:13.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelSchlesinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-10-17T22:10:31.000Z","updated_at":"2020-10-29T23:11:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ab189ee-4188-4bfd-8d7d-c1f3dd23e78c","html_url":"https://github.com/SamuelSchlesinger/haskell-server-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelSchlesinger/haskell-server-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelSchlesinger%2Fhaskell-server-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelSchlesinger%2Fhaskell-server-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelSchlesinger%2Fhaskell-server-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelSchlesinger%2Fhaskell-server-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelSchlesinger","download_url":"https://codeload.github.com/SamuelSchlesinger/haskell-server-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelSchlesinger%2Fhaskell-server-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271093014,"owners_count":24697915,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":"2024-10-27T17:36:33.515Z","updated_at":"2025-08-19T03:05:46.970Z","avatar_url":"https://github.com/SamuelSchlesinger.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell Server Template\n\nA minimal template for Haskell HTTP servers using [servant](https://www.servant.dev/),\n[wai](https://hackage.haskell.org/package/wai), [warp](https://hackage.haskell.org/package/warp),\n[fast-logger](https://hackage.haskell.org/package/fast-logger),\n[ekg](https://hackage.haskell.org/package/ekg). The aim of\nthis repository is to create a minimal template covering some of the\nboilerplate like settings and scaffolding, minimally sane middleware,\nbasic monitoring capabilities, and the start of a custom Prelude for the codebase.\n\nThis repository is licensed under the MIT license in order to allow people to\nuse it in free software as well as proprietary.\n\n# Code Structure\n\n![Module Structure](https://github.com/SamuelSchlesinger/haskell-server-template/blob/main/modules.png)\n\n# Operation\n\nTo run this server with the default configuration, run it with `cabal run server -- run`.\nIf you run `cabal run server -- help`, you will see:\n\n```\nusage:\nname: server\n|\n+- subprogram: help\n|\n+- subprogram: run\n|  |\n|  +- description: runs the server using the configuration provided\n|  |\n|  `- option: -config \u003cconfiguration-file :: FilePath\u003e, filepath of configuration, defaults to config.json\n|\n`- subprogram: docs\n   |\n   `- description: prints out documentation for the server\n```\n\nThe first invocation used the `config.json` file present in the repository,\nbut we can see that we can pass a custom configuration file if we want to.\nAfter running it, the server will be available at the host, port pair that\nis specified in the config, and the EKG server, if present in the config,\nwill be available at the host, port pair that is specified for it in the\nconfig. If a TLS config is provided, the server will be run using TLS.\n\nNote: The EKG server will never be run using TLS. You should never expose\nthe port you run it on to the outside world, otherwise people will have\naccess to all of your metrics. The preferred way to use it remotely in\nproduction would be to direct traffic securely through a TLS enabled proxy,\nor to port-forward under the protection of a VPN.\n\n# Generated API Documentation\n\n## GET /health\n\n### Check the health of the server.\n\n\n### The server will reply with a 204 status code if it is live. This status code means that we should not restart this service, though it may not be yet available for all functionality.\n\n\n### Response:\n\n- Status code 204\n- Headers: []\n\n- No response body\n\n## GET /ready\n\n### Check the readiness of the server.\n\n\n### The server will reply with a 204 status code if it is ready to receive traffic.\n\n\n### Response:\n\n- Status code 204\n- Headers: []\n\n- No response body\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelschlesinger%2Fhaskell-server-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelschlesinger%2Fhaskell-server-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelschlesinger%2Fhaskell-server-template/lists"}