npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mongoseed

v0.0.5

Published

mongoseed is a simple command line interface application to seed data from local db to server or server to local.

Downloads

8

Readme

mongoseed

version : 0.0.5

mongoseed is a simple command line interface tool to seed data from your local mongodb into server easily and you can also seed data from server to your local mongodb.

Requirement

  • You must have read and write access from server
  • If you don't have access read this blog will help to get access to mongodb from server

Usage

  • Run $ npm install -g mongoseed
  • Run $ mongoseed --fromHost 127.0.0.1 --fromPort 27017 --toHost 35.167.200.217 --toPort 27018

mongoseed

Options

--fromHost or --fh

  • Default : localhost

  • Specifies a resolvable hostname for the mongod to which to connect. By default, the mongoseed attempts to connect to a MongoDB instance running on the localhost on port number 27017.

--fromPort or --fp

  • Default : 27017

  • Specifies the TCP port on which the MongoDB instance listens for client connections.

--toHost or --th

  • Default : localhost

  • Specifies a resolvable hostname for the mongod to which to connect. By default, the mongoseed attempts to connect to a MongoDB instance running on the localhost on port number 6666.

--toPort or --tp

  • Default : 6666

  • Specifies the TCP port on which the MongoDB instance listens for client connections.

--db

  • If you want seed only one database then use this option to specifie database

--collection

  • If you want seed only one collection then use this option to specifie collection
  • Note : collection option must be followed by db

--query

  • Seed collection data based on query
  • Note : $gt,$ls,$or are supported in config file but not supported in command

--drop

  • Use drop option to dorp existing collection and seed data to destination host(--toHost)

--jsonArray

  • Specifie json file path to seed data from jsonArray

  • Options

    --host default: localhost

    --port default: 27017

    --db *Required

    --collection *Required

  • Example

    Run $ mongoseed --db dbName --collection collectionName --jsonArray ./fileName.json

--config

  • write set of command instruction and specifie the path of config file
  • example config file link here.
  • Example

    Run $ mongoseed --config ./config.json

Features

From 0.0.5

  • config file supported
  • Run $ mongoseed --config ./config.json

From 0.0.4

  • Seed data from json array file
  • Run $ mongoseed --db dbName --collection collectionName --jsonArray ./fileName.json

From 0.0.3

  • Seed single collection based on query
  • Run $ mongoseed --db dbName --collection collectionName --query "{_id:ObjectId('59072e67413f91965809ce10')}"

From 0.0.2

  • Seed single collection also supported
  • Run $ mongoseed --db dbName --collection collectionName

LICENSE

MIT

Enjoy!