Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update package name in examples... #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NeDB - The JavaScript Database
# NeDB - The JavaScript Database
[![Build Status](http://img.shields.io/travis/nedbhq/nedb-core.svg)](https://travis-ci.org/nedbhq/nedb-core)

**Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency**. API is a subset of MongoDB's and it's <a href="#speed">plenty fast</a>.
Expand Down Expand Up @@ -60,27 +60,27 @@ Also, if `loadDatabase` fails, all commands registered to the executor afterward

```javascript
// Type 1: In-memory only datastore (no need to load the database)
var Datastore = require('nedb')
var Datastore = require('nedb-core')
, db = new Datastore();


// Type 2: Persistent datastore with manual loading
var Datastore = require('nedb')
var Datastore = require('nedb-core')
, db = new Datastore({ filename: 'path/to/datafile' });
db.loadDatabase(function (err) { // Callback is optional
// Now commands will be executed
});


// Type 3: Persistent datastore with automatic loading
var Datastore = require('nedb')
var Datastore = require('nedb-core')
, db = new Datastore({ filename: 'path/to/datafile', autoload: true });
// You can issue commands right away


// Type 4: Persistent datastore for a Node Webkit app called 'nwtest'
// For example on Linux, the datafile will be ~/.config/nwtest/nedb-data/something.db
var Datastore = require('nedb')
var Datastore = require('nedb-core')
, path = require('path')
, db = new Datastore({ filename: path.join(require('nw.gui').App.dataPath, 'something.db') });

Expand Down