lowdb-middleware
Forked version of Json-Server, this repository focuses on ExpressJS middleware logic
Last updated a year ago by mgambill .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lowdb-middleware 
SYNC missed versions from official npm registry.

LowDB Middleware

Forked version of JSON Server. This package is intended to used as middleware from within an ExpressJS application.

Roadmap

  • [x] Update packages to latest versions
  • [x] Drop CLI support
  • [x] Rewrite code base to use ES6 style code ie: import fs from 'fs
  • [x] Add API hooks
  • [ ] Basic Auth plugin
  • [x] Database management endpoints
  • [x] Add dynamic databases routes
  • [ ] Use FileAsync via async/await
  • [ ] Configurable setup
  • [ ] Snapshots / Restore

Fixes / Enhancements

The following PRs were implemented from json-server repository

  • [x] Fix bug with null expand reference. PR640
  • [x] Add _contains operation PR691
  • [x] Add _attr option to reduce query context PR558
  • [x] Add _flatten option to flatten nested objects
  • [x] Add _keys option to reduce returned results

Example usage

Legacy database setup app.use('/test', middleware.staticRouter("./databases/test.json"))

New dynamic database setup app.use('/api', middleware.dynamicRouter())

structure is /api/{databasename}/{collection} => /api/application/users

Database management

List dynamic databases GET /api/db

Create new databases POST /api/db

Modify existing database PATCH /api/db

Documenation coming....

Current Tags

  • 1.0.0                                ...           latest (a year ago)

25 Versions

  • 1.0.0                                ...           a year ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.27                                ...           2 years ago
  • 0.1.26                                ...           2 years ago
  • 0.1.25                                ...           2 years ago
  • 0.1.24                                ...           2 years ago
  • 0.1.23                                ...           2 years ago
  • 0.1.22                                ...           2 years ago
  • 0.1.21                                ...           2 years ago
  • 0.1.20                                ...           2 years ago
  • 0.1.19                                ...           2 years ago
  • 0.1.18                                ...           2 years ago
  • 0.1.17                                ...           2 years ago
  • 0.1.16                                ...           2 years ago
  • 0.1.15                                ...           2 years ago
  • 0.1.14                                ...           2 years ago
  • 0.1.13                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (14)
Dev Dependencies (21)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |