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

mongo-pg-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-pg-cli

A workspace to work with mongo and postgres client

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

mongo-pg-cli

A workspace to work with mongo and postgres client

Installation

npm install -g mongo-pg-cli

How to use :

  • Go to workspace parent directory and create config.js
module.exports = {
    mongodb: {
        uri: process.env.MONGO_URL || 'mongodb://localhost:27017',
        options: {
            useUnifiedTopology: true
        }
    },
    pg: {
        user: 'postgres',
        host: '127.0.0.1',
        database: 'mydb',
        password: 'password',
        port: 5432
    },
    workdir: 'scripts'
};
  • Create directory with name according to the config and add file js
    {workdir}/filename.js :
module.exports = async (mongoClient, pgClient) => {
    console.log('running scripts');
};
  • Run script with command below on the same directory with config.js
mongo-pg-cli run <filename>

References

Mongo client and pg client using below references

  • postgres
  • mongodb

Keywords

mongo postgres

FAQs

Package last updated on 07 Nov 2021

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