{"id":15725847,"url":"https://github.com/ndrean/sse","last_synced_at":"2025-03-31T01:27:11.302Z","repository":{"id":49652612,"uuid":"517423418","full_name":"ndrean/sse","owner":"ndrean","description":"Produce ServerSentEvents in Elixir","archived":false,"fork":false,"pushed_at":"2022-07-31T17:08:35.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T06:46:07.702Z","etag":null,"topics":["elixir","https","sse"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ndrean.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}},"created_at":"2022-07-24T19:55:52.000Z","updated_at":"2022-07-28T21:48:51.000Z","dependencies_parsed_at":"2022-08-28T00:53:00.527Z","dependency_job_id":null,"html_url":"https://github.com/ndrean/sse","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/ndrean%2Fsse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Fsse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Fsse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Fsse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndrean","download_url":"https://codeload.github.com/ndrean/sse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246402588,"owners_count":20771343,"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":["elixir","https","sse"],"created_at":"2024-10-03T22:24:33.743Z","updated_at":"2025-03-31T01:27:11.234Z","avatar_url":"https://github.com/ndrean.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sse\n\nThe Elixir code tests works only in HTTP mode, but `curl` works for both.\nTo change mode, select in \"Application\" between the two setups:\n\n```elixir\n#Application\n{Plug.Cowboy, scheme: :https, plug: SSE.Router, options: plug_options},\n{Plug.Cowboy, scheme: :http,...}\n```\n\nIn `Router`, you have to declare the client endpoints for CORS.\nClient side, you have to select also the endpoint whether HTTP or HTTPS (in .ENV)\n\nThe Docker image works locally on HTTPS. It needs some modifications to be able to deploy.\n\nFor HTTP/1.1 between \u003chttp://localhost:4000/sse\u003e and \u003chttp://localhost:3000\u003e, run:\n\n```bash\nPORT 4000 mix run --no-halt\n```\n\nFor TLS HTTP/2, between self-signed \u003chttps://localhost:4000/sse\u003e and \u003chttps://demo-valtio.surge.sh\u003e, run:\n\n```bash\nPORT=4000 mix run --no-halt\n```\n\nUsed `mkcert` for self-signed certificats\n\n```bash\n# run this one\ncurl -v https://localhost:4043/sse\n\n# then run this one\ncurl -X POST -H \"content-type: application/json\" -d '{\"test\": \"hello Amy\"}' https://localhost:4043/post\n```\n\nCaddy is ready.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrean%2Fsse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndrean%2Fsse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrean%2Fsse/lists"}