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 forerunnerdb with all npm packages installed. Try it out:

var ForerunnerDB = require('forerunnerdb'), fdb = new ForerunnerDB(), db, results = {}; // Create a new database called "test" db = fdb.db('test'); // Create / get a new collection called "books" and insert a record db.collection('books').insert({ name: 'Harry Potter', price: 15.95 }); // Insert multiple books at the same time db.collection('books').insert([{ name: 'George Orwell\'s 1984', price: 12.00 }, { name: 'How to Build a Computer', price: 9.99 }, { name: 'Driving for Dummies', price: 3.50 }]); // Query the book collection for all books results.allBooks = db.collection('books').find(); // Query books that cost less than 10 results.cheapBooks = db.collection('books').find({ price: { $lt: 10 } }); // Query books with a regular expression results.regexBooks = db.collection('books').find({ name: /Potter/ }); // Get all the book ids as an array results.booksIds = db.collection('books').find({}, { $aggregate: '_id' }); // Output the results console.log(results);

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

forerunnerdb v1.3.713

A NoSQL document store database for browsers and Node.js.

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