JavaScript database connector for tiny-blog.
Uses a MongoDB as storage backend.
Models follow the tiny-blog-api spec: https://github.com/strangedev/tiny-blog-api/tree/master/spec
- tiny-blog: https://github.com/strangedev/tiny-blog
- tiny-blog-api: https://github.com/strangedev/tiny-blog-api
- tiny-blog-backend: https://github.com/strangedev/tiny-blog-backend
- tiny-blog-ui: https://github.com/strangedev/tiny-blog-ui
- tiny-blog-model: https://github.com/strangedev/tiny-blog-model
- BlogEntry
- store(host, port)
- getDb
- BlogEntry
- view
- newest
- byTag
- mutation
- insert
- remove
- update
- view
- Tag
- view
- all
- view
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);
}
);
yarn install
# transpile JS to build/
yarn run build
# run tests
yarn run test