Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including acebase with all npm packages installed. Try it out:

const { AceBase } = require('acebase'); // Open or create database: const db = new AceBase('mydb', { logLevel: 'error' }); // Set data at "runkit/test" await db.ref('runkit/test').set({ text: 'This is a test', created: new Date(), }); // Update "text" child of "runkit/test", create "modified" child await db.ref('runkit/test').update({ text: 'Updated text with a parent node update', modified: new Date(), }); // Overwrite "runkit/test/text" await db.ref('runkit/test/text').set('Updated text by setting it'); // Get all data stored at "runkit/test" const snapshot = await db.ref('runkit/test').get(); console.log('Value stored at "runkit/test":'); console.log(snapshot.val()); // Transactional update on "runkit/test/counter" await db.ref('runkit/test/counter').transaction(snapshot => { const val = snapshot.exists() ? snapshot.val() : 0; return val + 1; // new value for "counter" property }); // Remove "runkit" await db.ref('runkit').remove();

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

acebase v1.29.5

AceBase realtime database. Open source firebase alternative for nodejs and browser, with additional features: indexes, geo, fulltext, queries, custom storage, offline usage, synchronization, live data proxies and more

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free