diff --git a/README.md b/README.md index dc4b8fd3..5065ccf2 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@

- build - Latest releases - Go package documentation + build + Latest releases + Go package documentation

[PocketBase](https://pocketbase.io) is an open source Go backend that includes: @@ -17,6 +17,12 @@ - convenient **Admin dashboard UI** - and simple **REST-ish API** +> [!NOTE] +> This is a fork of the great [pocketbase/pocketbase][] repository adapted for +> Tabshift's purposes. + +[pocketbase/pocketbase]: https://github.com/pocketbase/pocketbase + **For documentation and examples, please visit https://pocketbase.io/docs.** > [!WARNING] @@ -32,7 +38,6 @@ The easiest way to interact with the PocketBase Web APIs is to use one of the of You could also check the recommendations in https://pocketbase.io/docs/how-to-use/. - ## Overview ### Use as standalone app @@ -52,33 +57,34 @@ Here is a minimal example: 0. [Install Go 1.25+](https://go.dev/doc/install) (_if you haven't already_) 1. Create a new project directory with the following `main.go` file inside it: - ```go - package main - import ( - "log" + ```go + package main - "github.com/pocketbase/pocketbase" - "github.com/pocketbase/pocketbase/core" - ) + import ( + "log" - func main() { - app := pocketbase.New() + "github.com/pocketbase/pocketbase" + "github.com/pocketbase/pocketbase/core" + ) - app.OnServe().BindFunc(func(se *core.ServeEvent) error { - // registers new "GET /hello" route - se.Router.GET("/hello", func(re *core.RequestEvent) error { - return re.String(200, "Hello world!") - }) + func main() { + app := pocketbase.New() - return se.Next() - }) + app.OnServe().BindFunc(func(se *core.ServeEvent) error { + // registers new "GET /hello" route + se.Router.GET("/hello", func(re *core.RequestEvent) error { + return re.String(200, "Hello world!") + }) - if err := app.Start(); err != nil { - log.Fatal(err) - } - } - ``` + return se.Next() + }) + + if err := app.Start(); err != nil { + log.Fatal(err) + } + } + ``` 2. To init the dependencies, run `go mod init myapp && go mod tidy`.