{"id":13410041,"url":"https://github.com/iamelevich/pocketbase-plugin-ngrok","last_synced_at":"2026-06-09T02:11:46.375Z","repository":{"id":143569783,"uuid":"616170542","full_name":"iamelevich/pocketbase-plugin-ngrok","owner":"iamelevich","description":"Plugin for Pocketbase that allow you expose it with ngrok","archived":false,"fork":false,"pushed_at":"2026-04-07T21:49:56.000Z","size":559,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-07T23:24:35.189Z","etag":null,"topics":["ngrok","pocketbase","pocketbase-plugins"],"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/iamelevich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-19T20:04:42.000Z","updated_at":"2026-04-07T21:50:00.000Z","dependencies_parsed_at":"2025-12-17T07:05:10.719Z","dependency_job_id":null,"html_url":"https://github.com/iamelevich/pocketbase-plugin-ngrok","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/iamelevich/pocketbase-plugin-ngrok","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-ngrok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-ngrok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-ngrok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-ngrok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamelevich","download_url":"https://codeload.github.com/iamelevich/pocketbase-plugin-ngrok/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamelevich%2Fpocketbase-plugin-ngrok/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ngrok","pocketbase","pocketbase-plugins"],"created_at":"2024-07-30T20:01:04.664Z","updated_at":"2026-04-11T20:11:50.413Z","avatar_url":"https://github.com/iamelevich.png","language":"Go","funding_links":[],"categories":["Plugins","Tools/Plugin","Go Plugins"],"sub_categories":["Extended Go"],"readme":"[![Test](https://github.com/iamelevich/pocketbase-plugin-ngrok/actions/workflows/test.yml/badge.svg)](https://github.com/iamelevich/pocketbase-plugin-ngrok/actions/workflows/test.yml)\n[![codecov](https://codecov.io/github/iamelevich/pocketbase-plugin-ngrok/graph/badge.svg?token=J8NRLAO01G)](https://codecov.io/github/iamelevich/pocketbase-plugin-ngrok)\n\n\u003c!-- TOC --\u003e\n* [Overview](#overview)\n  * [Requirements](#requirements)\n  * [Installation](#installation)\n  * [Example](#example)\n* [pocketbase\\_plugin\\_ngrok](#pocketbasepluginngrok)\n  * [Index](#index)\n  * [type Options](#type-options)\n  * [type Plugin](#type-plugin)\n    * [func MustRegister](#func-mustregister)\n    * [func Register](#func-register)\n    * [func \\(\\*Plugin\\) Validate](#func-plugin-validate)\n* [Contributing](#contributing)\n  * [Process](#process)\n  * [Development setup](#development-setup)\n  * [Testing](#testing)\n  * [Linting](#linting)\n  * [Docs update in README](#docs-update-in-readme)\n\u003c!-- TOC --\u003e\n\n# Overview\n\nThis plugin allow expose local [Pocketbase](https://github.com/pocketbase/pocketbase) with [ngrok](https://ngrok.com/)\n\nThis plugin can be used for development purposes, when you need to expose your local Pocketbase instance to the internet. For example, you can use it to test your Pocketbase app on mobile device.\n\n## Requirements\n\n- Go 1.25+\n- [Pocketbase](https://github.com/pocketbase/pocketbase) 0.36+\n\n## Installation\n\n```bash\ngo get github.com/iamelevich/pocketbase-plugin-ngrok\n```\n\n## Example\n\nYou can check examples in [examples folder](/examples)\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\tngrokPlugin \"github.com/iamelevich/pocketbase-plugin-ngrok\"\n\t\"log\"\n\n\t\"github.com/pocketbase/pocketbase\"\n)\n\nfunc main() {\n\tapp := pocketbase.New()\n\n\t// Setup ngrok\n\tngrokPlugin.MustRegister(app, \u0026ngrokPlugin.Options{\n\t\tCtx:       context.Background(),\n\t\tEnabled:   true,\n\t\tAuthToken: \"YOUR_NGROK_AUTH_TOKEN\", // Better to use ENV variable for that\n\t})\n\n\tif err := app.Start(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n\u003c!-- gomarkdoc:embed:start --\u003e\n\n\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# pocketbase\\_plugin\\_ngrok\n\n```go\nimport \"github.com/iamelevich/pocketbase-plugin-ngrok\"\n```\n\n## Index\n\n- [type Options](\u003c#Options\u003e)\n- [type Plugin](\u003c#Plugin\u003e)\n  - [func MustRegister\\(app core.App, options \\*Options\\) \\*Plugin](\u003c#MustRegister\u003e)\n  - [func Register\\(app core.App, options \\*Options\\) \\(\\*Plugin, error\\)](\u003c#Register\u003e)\n  - [func \\(p \\*Plugin\\) Validate\\(\\) error](\u003c#Plugin.Validate\u003e)\n- [type TunnelForwarder](\u003c#TunnelForwarder\u003e)\n\n\n\u003ca name=\"Options\"\u003e\u003c/a\u003e\n## type [Options](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L22-L41\u003e)\n\nOptions defines optional struct to customize the default plugin behavior.\n\n```go\ntype Options struct {\n    // Ctx is a context that will be used to start ngrok tunnel.\n    Ctx context.Context\n\n    // Enabled defines if ngrok tunnel should be started.\n    Enabled bool\n\n    // Enable logging of ngrok events to pocketbase logger\n    EnableLogging bool\n\n    // AuthToken is your ngrok auth token. You can get it from https://dashboard.ngrok.com/auth\n    AuthToken string\n\n    // AfterSetup is a callback function that will be called after ngrok tunnel is started.\n    AfterSetup func(url *url.URL) error\n\n    // TunnelForwarder is optional. When set, used instead of ngrok for creating tunnels.\n    // Primarily useful for testing without a real ngrok connection.\n    TunnelForwarder TunnelForwarder\n}\n```\n\n\u003ca name=\"Plugin\"\u003e\u003c/a\u003e\n## type [Plugin](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L43-L49\u003e)\n\n\n\n```go\ntype Plugin struct {\n    // contains filtered or unexported fields\n}\n```\n\n\u003ca name=\"MustRegister\"\u003e\u003c/a\u003e\n### func [MustRegister](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L149\u003e)\n\n```go\nfunc MustRegister(app core.App, options *Options) *Plugin\n```\n\nMustRegister is a helper function that registers plugin and panics if error occurred.\n\n\u003ca name=\"Register\"\u003e\u003c/a\u003e\n### func [Register](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L158\u003e)\n\n```go\nfunc Register(app core.App, options *Options) (*Plugin, error)\n```\n\nRegister registers plugin.\n\n\u003ca name=\"Plugin.Validate\"\u003e\u003c/a\u003e\n### func \\(\\*Plugin\\) [Validate](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L52\u003e)\n\n```go\nfunc (p *Plugin) Validate() error\n```\n\nValidate plugin options. Return error if some option is invalid.\n\n\u003ca name=\"TunnelForwarder\"\u003e\u003c/a\u003e\n## type [TunnelForwarder](\u003chttps://github.com/iamelevich/pocketbase-plugin-ngrok/blob/master/plugin.go#L17-L19\u003e)\n\nTunnelForwarder creates ngrok tunnels. Used for dependency injection in tests. When nil, the default ngrok implementation is used.\n\n```go\ntype TunnelForwarder interface {\n    Forward(ctx context.Context, upstreamAddr, authToken string, enableLogging bool, logger interface{}) (*url.URL, error)\n}\n```\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n\n\n\u003c!-- gomarkdoc:embed:end --\u003e\n\n# Contributing\n\nThis pocketbase plugin is free and open source project licensed under the [MIT License](LICENSE.md).\nYou are free to do whatever you want with it, even offering it as a paid service.\n\n## Process\n\n- Fork the repo\n- Create a new branch\n- Make your changes\n- Create a pull request\n- Wait for review\n- Make changes if needed\n- Merge\n- Celebrate :)\n\n## Development setup\n\n- Install [mise](https://mise.jdx.dev/installing-mise.html) and run `mise install`.\n- Setup `prek` hooks with `prek install -t commit-msg -t pre-commit`\n\n## Testing\n\n- Run `mise run test` to run tests\n- Run `mise run test-report` to run tests and get coverage report in `./coverage.html`\n\n## Linting\n\n- Run `mise run lint` to run linters\n\n## Docs update in README\n\n- Run `mise run docs` to update docs in README (it will also install [gomarkdoc](https://github.com/princjef/gomarkdoc))","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-ngrok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-ngrok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamelevich%2Fpocketbase-plugin-ngrok/lists"}