New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

uam-models

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uam-models

User And Access Management Model package for CRUD operation

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

models

Instalation

  npm i --save uam-models

Content

This package contains functionality for the following services:

  • Accounts

The code use mongoose for connecting the database. Mongo Connection string is stored in environment variables for example: MONGO_ATLAS_URI_ACCOUNTS=''

Usage

Users

  import { User } from 'uam-models';
  import { Mongoose } from 'mongoose';

  const userConnection = new Connection(
    process.env.MONGO_ATLAS_URI_ACCOUNTS as string,
    {
      useNewUrlParser: true,
      useFindAndModify: false,
      useCreateIndex: true
    },
    new Mongoose()
  );

  const user = new User(userConnection.createConnection());

If we want to use mongoose functionality in everywhere, just use as those examples:

  user.model().find()
  user.model().findById()
  user.model().create()

FAQs

Package last updated on 09 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts