{"id":22769801,"url":"https://github.com/bfontaine/ephemeral","last_synced_at":"2025-03-30T11:30:02.385Z","repository":{"id":31053311,"uuid":"34612047","full_name":"bfontaine/ephemeral","owner":"bfontaine","description":"Ephemeral Web server in Go","archived":false,"fork":false,"pushed_at":"2015-04-26T13:37:31.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:43:40.212Z","etag":null,"topics":["go","library","web"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/bfontaine/ephemeral","language":"Go","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/bfontaine.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}},"created_at":"2015-04-26T13:13:04.000Z","updated_at":"2022-11-04T10:24:52.000Z","dependencies_parsed_at":"2022-08-30T14:40:54.095Z","dependency_job_id":null,"html_url":"https://github.com/bfontaine/ephemeral","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/bfontaine%2Fephemeral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fephemeral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fephemeral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Fephemeral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfontaine","download_url":"https://codeload.github.com/bfontaine/ephemeral/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246313314,"owners_count":20757446,"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":["go","library","web"],"created_at":"2024-12-11T15:15:53.371Z","updated_at":"2025-03-30T11:30:02.344Z","avatar_url":"https://github.com/bfontaine.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ephemeral\n\n`ephemeral` is a lightweight library to fire an ephemeral Web server. It’s\nuseful when you’re writing a CLI app which needs to authenticate against a\nremote server using a callback URI.\n\n[![GoDoc](https://godoc.org/github.com/bfontaine/ephemeral?status.svg)](https://godoc.org/github.com/bfontaine/ephemeral)\n[![Build Status](https://travis-ci.org/bfontaine/ephemeral.svg?branch=master)](https://travis-ci.org/bfontaine/ephemeral)\n\n## Usage\n\nEphemeral provides a small `http`-like API. Start by creating a server:\n\n```go\ns := ephemeral.New()\n```\n\nThen declare your handler like you’d do with a classic HTTP server, except that\nit takes the server as its first argument:\n\n```go\ns.HandleFunc(\"/\", func(s *ephemeral.Server,\n    w http.ResponseWriter, r *http.Request) {\n\n    w.Write([]byte(\"Ok bye :)\\n\"))\n\n    s.Stop(\"foo\")\n})\n```\n\nThe server exposes a `Stop` method which takes one argument that can be\nwhatever you want, including `nil`.\n\nStart the server:\n\n```go\ns.Listen(\":8080\")\n```\n\nThe method won’t return until the server is stopped. It returns the argument\nyou gave to the `.Stop()` call as well as an `error`.\n\n## Install\n\n    go get github.com/bfontaine/ephemeral\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fephemeral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfontaine%2Fephemeral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Fephemeral/lists"}