# mojahed-mongoose-model

> Implements Model of MVC using mongoose.

Latest version **1.0.3** (published 2021-08-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install mojahed-mongoose-model
pnpm add mojahed-mongoose-model
yarn add mojahed-mongoose-model
bun add mojahed-mongoose-model
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-08-08 |
| First published | 2021-08-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Md Mojahedul Islam |
| Maintainers | mohammad_mojahed |
| Keywords | mvc, MVC, Nodejs MVC, model |

## Links

- npm: https://www.npmjs.com/package/mojahed-mongoose-model
- npm.io page: https://npm.io/package/mojahed-mongoose-model

## Dependencies (2)

- [config](https://npm.io/package/config.md) ^3.3.6
- [mongoose](https://npm.io/package/mongoose.md) ^5.13.5

## Recent versions

- 1.0.3 (latest) — 2021-08-08
- 1.0.2 — 2021-08-07
- 1.0.1 — 2021-08-07
- 1.0.0 — 2021-08-07

## README

## Installation

Using npm:

```
$ cd <your-project-directory>
$ npm i mojahed-mongoose-model

```
##### Inside package.json add to scripts :

```
"make:model" : "node ./node_modules/mojahed-mongoose-model/commands/make_model.js",
"make:model-structure" : "node ./node_modules/mojahed-mongoose-model/commands/structure.js"

```

##### run :
```
$ npm run make:model-structure

```
##### Inside config/default.json update DB_URL:
```
{
    "DB_URL" : "<MongoDB_url>"
}

```
## Usage

```
$ npm run make:model User

```

User Model will be created inside project-directory/models/

##### Inside other javascript file :
```
const User = require('./models/User');

await User.create({
    'name' : '< name >',
    'email' : '< email >',
    ...
});
```
## Related package :
* [mojahed-express-controller](https://www.npmjs.com/package/mojahed-express-controller)

## More About Mongoose Model
* [Mongoose Model](https://mongoosejs.com/docs/api/model.html)

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