Giter Club home page Giter Club logo

gmn / mongolite Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 240 KB

*notice, this project has been deprecated. The name has been changed to Queryable. Mongolite - A tiny, self-contained, single file database, written in pure Javascript, which aims to support a functional subset of MongoDB commands. It works seamlessly in both the client (browser) and the server (node.js). Just include it in your project and go.

Home Page: https://www.npmjs.org/package/queryable

License: MIT License

JavaScript 100.00%

mongolite's Introduction

Mongolite

deprecated

This project has been renamed project to Queryable. Mongolite will no longer be updated and will be removed eventually. Please use https://github.com/gmn/queryable instead.


original documentation

Mongolite - A tiny, self-contained, single file database, written in pure Javascript, which aims to support a functional subset of MongoDB commands. It works seamlessly in both the client (browser) and the server (node.js). Just include it in your project and go. The database format is stored as human-readable JSON, one file per each database.

Examples

To use mongolite.js in node.js, simply do:

var mongolite = require( './mongolite.js' ); // path to JS

var db = mongolite.open( path_to_db );      // ** There are multiple ways to open a db, but the simplest is to put 
db.insert( {key:"Anything you want"} );     //    the path and filename to where you want it. Eg.: "/tmp/my_data.db"

var db2 = mongolite.open( "another.db" );   // ** Multiple databases can be opened at once; each is fully independent.
db2.insert( {subarray:[1,2,'buckle',{'my':'shoe'}]} );

var result = db.find( /regex/ );            // ** Find() command works like MongoDB
                                            // ** Returns db_result, which has a length property and _data[] array
                                            //    as well as chainable methods like: .sort(), .limit(), .skip(), ..

See examples in the test folder.

In the Works

  1. Better documentation; Website.

  2. Feature Roadmap: which features will be implemented next, roughly in order.

  3. Sample projects built on mongolite demonstrating features and functionality.

Contact

Mail: greg AT naughton.org for questions, comments

mongolite's People

Contributors

gmn avatar

Stargazers

JMV avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.