Pocketbase:一个文件中的开源后端
Pocketbase: Open-source back end in one file

原始链接: https://pocketbase.io/

在不到 100 个字的时间内,Pocket Base 提供了一种轻松的方法,使用其开源平台为移动应用程序和 Web 应用程序构建可扩展的后端。 凭借其嵌入式高性能数据库,Pocket Base 提供了易于使用的工具,用于通过 Google、Facebook、GitHub 和 GitLab 等流行平台管理用户身份验证。 此外,它还允许通过本地或云存储选项进行灵活的文件管理。 该 API 拥有广泛的功能,例如订阅跨集合的实时更新、轻松附加媒体以及按需生成缩略图。 它与流行的前端堆栈无缝集成,同时提供广泛的文档。 Pocket Base 提供了现场演示,您可以在其中进一步探索所有这些功能。 总之,这种多功能解决方案简化了应用程序开发,使其比以往任何时候都更容易!

我不同意任何观点或信念,但根据 pocketbase 自己提供的文档,他们当前的建议是开发 javascript 或 dart 前端。 然而,他们承认有些用户可能更喜欢打字系统(例如打字稿),因此他们提供了如何设置的指导。 关于服务器,虽然 pocketsbase 确实公开了一个 http api,但它也有一个 dart 或 go 中的附带客户端 sdks,允许前端开发而无需外部库或包,并且由于它实现了 websockets,因此允许实时交互。 ultimately, the choice to use pocketsbase for your backend depends largely on your individual preferences and use case。
相关文章

原文

// JavaScript SDK import PocketBase from 'pocketbase'; const pb = new PocketBase('http://127.0.0.1:8090'); ... // list and search for 'example' collection records const list = await pb.collection('example').getList(1, 100, { filter: 'title != "" && created > "2022-08-01"', sort: '-created,title', }); // or fetch a single 'example' collection record const record = await pb.collection('example').getOne('RECORD_ID'); // delete a single 'example' collection record await pb.collection('example').delete('RECORD_ID'); // create a new 'example' collection record const newRecord = await pb.collection('example').create({ title: 'Lorem ipsum dolor sit amet', }); // subscribe to changes in any record from the 'example' collection pb.collection('example').subscribe('*', function (e) { console.log(e.record); }); // stop listening for changes in the 'example' collection pb.collection('example').unsubscribe();

联系我们 contact @ memedata.com