Pocketbase: Open-source back end in one file

Pocketbase: Open-source back end in one file

Open Source backend

for your next SaaS and Mobile app

in 1 file


Realtime database


Authentication


File storage


Admin dashboard

Ready to use out of the box

// 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();

Integrate nicely with your favorite frontend stack





Read More

Leave a Reply

Your email address will not be published. Required fields are marked *