{"id":19144428,"url":"https://github.com/maragudk/dblens","last_synced_at":"2025-07-07T07:05:39.773Z","repository":{"id":64411494,"uuid":"575334853","full_name":"maragudk/dblens","owner":"maragudk","description":"An HTTP handler for database browsing.","archived":false,"fork":false,"pushed_at":"2023-02-27T10:23:22.000Z","size":35,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T11:58:38.716Z","etag":null,"topics":["go","golang","http-handler"],"latest_commit_sha":null,"homepage":"","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/maragudk.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":"2022-12-07T09:26:37.000Z","updated_at":"2023-04-11T15:59:56.000Z","dependencies_parsed_at":"2024-11-09T07:47:09.598Z","dependency_job_id":null,"html_url":"https://github.com/maragudk/dblens","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"maragudk/template","purl":"pkg:github/maragudk/dblens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maragudk%2Fdblens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maragudk%2Fdblens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maragudk%2Fdblens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maragudk%2Fdblens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maragudk","download_url":"https://codeload.github.com/maragudk/dblens/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maragudk%2Fdblens/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264032219,"owners_count":23546795,"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","golang","http-handler"],"created_at":"2024-11-09T07:34:56.055Z","updated_at":"2025-07-07T07:05:39.740Z","avatar_url":"https://github.com/maragudk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dblens\n\nAn HTTP handler for database browsing.\n\nBEWARE: `dblens.Handler` accepts ALL queries, including destructive ones. Don't expose the handler to the wide public.\n\n## Usage\n\n```shell\ngo get -u github.com/maragudk/dblens\n```\n\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\t\"errors\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t_ \"github.com/mattn/go-sqlite3\"\n\n\t\"github.com/maragudk/dblens\"\n)\n\nfunc main() {\n\tos.Exit(start())\n}\n\nfunc start() int {\n\tlog := log.New(os.Stderr, \"\", log.Ldate|log.Ltime|log.Lshortfile|log.LUTC)\n\n\tdb, err := sql.Open(\"sqlite3\", \"app.db?_journal=WAL\u0026_timeout=5000\u0026_fk=true\")\n\tif err != nil {\n\t\tlog.Println(\"Error opening database:\", err)\n\t\treturn 1\n\t}\n\n\tlog.Println(\"Starting on http://localhost:8080\")\n\n\tif err := http.ListenAndServe(\"localhost:8080\", dblens.Handler(db, \"sqlite3\")); err != nil \u0026\u0026\n\t\t!errors.Is(err, http.ErrServerClosed) {\n\t\tlog.Println(\"Error:\", err)\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n```\n\n## Screenshot\n\n![screenshot.png](docs%2Fscreenshot.png)\n\nMade in 🇩🇰 by [maragu](https://www.maragu.dk/), maker of [online Go courses](https://www.golang.dk/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaragudk%2Fdblens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaragudk%2Fdblens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaragudk%2Fdblens/lists"}