npm.io
1.0.7 • Published 2 years ago

monguex

Licence
MIT
Version
1.0.7
Deps
1
Size
201 kB
Vulns
0
Weekly
0

monguex

Biblioteca monguex utilitário das funções do mongoose
NPM - https://www.npmjs.com/package/monguex

Instalação

Para instalar a biblioteca, utilize o seguinte comando:

npm install monguex

ou

yarn  add monguex

Uso

Exemplos de como utilizar a biblioteca:

import  {monguex}  from 'monguex';



(async()=>{
  await monguex.connect("URL_MONGOOSE")

const userProps = {
  nome: String,
  idade: Number,
  email: String
};

const UserModel = monguex.createSchema('User',userProps,{timestamps:true})


await monguex.save(UserModel,{
    nome: 'John Doex',
    idade: 25,
    email: 'john.doex@example.com',
 })

})()

Keywords