0.0.29 • Published 20 days ago

@offscale/orm-mw v0.0.29

Weekly downloads
39
License
(Apache-2.0 OR MI...
Repository
-
Last release
20 days ago

orm-mw

License npm-publish NPM version

Generic--connect, restify, express--middleware adding connection to 0-k ORMs to a .getDb method on req.

Supported ORMs:

Supported cursors:

Install

npm i -S @offscale/orm-mw

Usage

import { ormMw } from '@offscale/orm-mw';

server.use(ormMw(/*IOrmMwConfig*/));

Explicit cleanup

Essentially only useful for tests:

import { tearDownConnections } from '@offscale/orm-mw';

tearDownConnections(/*ormsInArgs*/, err => {
    if (err != null) throw err; 
});

Configuration

See IOrmMwConfig interface in orm-mw.d.ts.

Extending

Adding a new ORM? - Expand the IOrmMwConfig interface, and add a new short-function that implements it. See others for reference.

Development setup

Install the latest Node.JS, npm i -g typings typescript, then:

git clone https://github.com/SamuelMarks/orm-mw
cd orm-mw
typings i
npm test

Future work

  • Add more ORMs and cursors

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

0.0.29

20 days ago

0.0.28

3 months ago

0.0.27

1 year ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago