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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mission05_mongo

v1.0.0

Published

Auction item search application using MongoDB and Express.

Readme

Auction CLI Tool

A Node.js command-line utility for managing auction items in a MongoDB database. This tool allows you to list, add, update, delete, search, and seed auction items directly from the terminal.

Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (running locally)

Steps to Install

  1. Clone the repository:

    git clone <your-repository-url>
    cd <your-repository-name>
  2. Install dependencies:

    npm install
  3. Start MongoDB:

    Make sure MongoDB is running locally. You can start it with:

    mongod
  4. Run the CLI Tool:

    The CLI tool is located in the cli.js file, which you can use to interact with the auction database. Use the following command:

    npm run <command>

    The available commands are detailed below.

Usage

Commands

  1. Seed the database:

    Populate the database with initial auction items from a sample JSON file.

    npm run seed

    This command will:

    • Clear any existing items in the auctionDB collection.
    • Insert new items from the auction_items.json file into the database.
  2. Search auction items:

    Search for auction items by their title or description.

    auction-cli search <query>

    Example:

    auction-cli search "bike"

    This command will search the database for auction items matching the given search query and display the results.

  3. List all auction items:

    List all auction items in the database.

    auction-cli list

    Example output:

    Found 3 auction items:
    1. ID: 123456 - Road Bike - Lightweight road bike with a comfortable design $200
    2. ID: 789101 - Antique Vase - A beautiful and rare antique vase from the 18th century $500
  4. Add a new auction item:

    Add a new auction item to the database with the title, description, and price.

    auction-cli add <title> <description> <price>

    Example:

    auction-cli add "Laptop" "A brand new gaming laptop" 1200

    This command will add a new auction item with the given details to the database.

  5. Delete an auction item by ID:

    Delete an auction item from the database by its unique ID.

    auction-cli delete <id>

    Example:

    auction-cli delete 1234567890abcdef12345678

    This command will delete the item with the specified ID.

  6. Update an auction item by ID:

    Update the details (title, description, price) of an auction item using its unique ID.

    auction-cli update <id> <title> <description> <price>

    Example:

    auction-cli update 1234567890abcdef12345678 "Updated Laptop" "A newly updated gaming laptop" 1300

    This command will update the auction item with the given ID.

Help Command

To display help information about the available commands and options:

auction-cli --help


### Key Updates:

- The command to **seed the database** is now referenced with `npm run seed` instead of directly running the `seed.cjs` file.
- **Running the application** is done with `npm start`, which will execute the `server.cjs` file.
- You can still use the `auction-cli` commands like `search`, `list`, `add`, `update`, and `delete` from the terminal.

Let me know if anything else needs to be adjusted!