# coal-m

> simple package mongoose

Latest version **0.0.2** (published 2015-11-03) · 0 weekly downloads

## Install

```sh
npm install coal-m
pnpm add coal-m
yarn add coal-m
bun add coal-m
```

## 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.0.2 |
| Published | 2015-11-03 |
| First published | 2015-09-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Author | L.T_huyinghuan |
| Maintainers | huyinghuan |

## Links

- npm: https://www.npmjs.com/package/coal-m
- Homepage: https://github.com/huyinghuan/slow-cli
- npm.io page: https://npm.io/package/coal-m

## Dependencies (2)

- [sload](https://npm.io/package/sload.md) ^0.1.3-rc4
- [mongoose](https://npm.io/package/mongoose.md) ^4.1.6

## Recent versions

- 0.0.2 (latest) — 2015-11-03
- 0.0.1 — 2015-09-16

## README

### Coal-M

 simple package mongoose. [github](https://github.com/huyinghuan/coal-m)
 
 
### Install

```

npm install coal-m --save

```

### Getting start

```
_CoalM = require 'coal-m'

coal = new _CoalM(config)

Book = coal.model('book')

Book.create({xxx:xxx}, (err, xxx)->)
```

### What is config?

```
module.exports =
  username: false 
  password: false
  ip: "localhost"
  port: "27017"
  options: {}
  database: "testCoalM"
  schema: "schema directory"
```

what is schema? 

schema is a directory what save model files.

a model file like this:

```
module.exports =
  name: "book"
  fields:
    title:  String
    author: String
    body:   String
    comments: [{ body: String, date: Date }]
    date: { type: Date, default: Date.now }
```

so. you can get a Model by ```_coal.modal(schemaName)```

Details see the test directory in [github](https://github.com/huyinghuan/coal-m/tree/master/test)

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