1.0.0 • Published 5 years ago

lowdb-middleware v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

LowDB Middleware

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

Roadmap

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

Fixes / Enhancements

The following PRs were implemented from json-server repository

  • Fix bug with null expand reference. PR640
  • Add _contains operation PR691
  • Add _attr option to reduce query context PR558
  • Add _flatten option to flatten nested objects
  • 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....

1.0.0

5 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.27

6 years ago

0.1.26

6 years ago

0.1.25

6 years ago

0.1.24

6 years ago

0.1.23

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago