Ola.
Its amazing with the latest version of PocketBase one can extend it with JavaScript / Go.
So I tested creating some REST API handlers. You can unzip the attached file to your pocketbase folder. It should create a pb_hooks folder. You can then call the handler via the browser after starting your server.
It seems one can also do direct DB calls with this. A lot to be explored.
This is the simple code on the created js file.
Enjoy!
Its amazing with the latest version of PocketBase one can extend it with JavaScript / Go.
So I tested creating some REST API handlers. You can unzip the attached file to your pocketbase folder. It should create a pb_hooks folder. You can then call the handler via the browser after starting your server.
It seems one can also do direct DB calls with this. A lot to be explored.
This is the simple code on the created js file.
B4X:
routerAdd("GET", "/api/hello/:name", (c) => {
let name = c.pathParam("name")
return c.json(200, { "message": "Hello " + name })
}
Enjoy!