0.1.7 • Published 5 years ago

tiny-blog-db v0.1.7

Weekly downloads
5
License
Apache 2.0
Repository
github
Last release
5 years ago

tiny-blog-db

JavaScript database connector for tiny-blog.

npm codecov

Uses a MongoDB as storage backend.

Models follow the tiny-blog-api spec: https://github.com/strangedev/tiny-blog-api/tree/master/spec

Related repos

Usage

API Structure

  • BlogEntry
  • store(host, port)
    • getDb
    • BlogEntry
      • view
        • newest
        • byTag
      • mutation
        • insert
        • remove
        • update
    • Tag
      • view
        • all

Example

import {Store} from "tiny-blog-db";
const store = Store("localhost", 27017);

let offset = 0;
let limit = 50;
let cancel = store.BlogEntry.view.newest(offset, limit).fork(
    console.err,
    result => {
        // do something with the result...
        console.log(result);
    }
);

Development

yarn install

# transpile JS to build/
yarn run build

# run tests
yarn run test
0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago