# samjs-mongo-configwise

> A module for the mongo plugin for samjs. Exposes a model for each entry of a given config item.

Latest version **0.1.1** (published 2015-09-02) · 0 weekly downloads

## Install

```sh
npm install samjs-mongo-configwise
pnpm add samjs-mongo-configwise
yarn add samjs-mongo-configwise
bun add samjs-mongo-configwise
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-09-02 |
| First published | 2015-09-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paul Pflugradt |
| Maintainers | paulpflug |

## Links

- npm: https://www.npmjs.com/package/samjs-mongo-configwise
- Repository: https://github.com/SAMjs/samjs-mongo-configwise
- Issues: https://github.com/SAMjs/samjs-mongo-configwise/issues
- npm.io page: https://npm.io/package/samjs-mongo-configwise

## Recent versions

- 0.1.1 (latest) — 2015-09-02

## README

# samjs-mongo-configwise

A module for the mongo plugin for samjs.
Exposes a model for each entry of a given config item.

## Example
```coffee
samjs.plugins(require("samjs-mongo"),require("samjs-mongo-configwise"))
.options({config:"config.json"})
.configs({name:"someConfig",read:true,write:true})
.models({
  name:"someModel"
  db:"mongo",
  plugins:
    configwise:
      configName: "someConfig"
      propName: "name"
  schema:
    name: String
}).startup().io.listen(3000)
## client side
samjs = require("samjs-client")({url: window.location.host+":3000/"})
samjs.plugins(require "samjs-mongo-client")
samjs.config.set "someConfig", [name:"first",name:"second"]
.then ->
  # two independet tables with the same schema
  someModelfirst = new samjs.Mongo("first.someModel")
  someModelsecond = new samjs.Mongo("second.someModel")
```

---
_Source: https://npm.io/package/samjs-mongo-configwise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
