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

@code-collabo/node-mongo-cli

v2.3.0

Published

node-mongo-cli Command Line Interface made with nodejs to bootstrap any of 3 boilerplate templates for your nodejs and/or mongoDB development.

Downloads

7

Readme

@code-collabo/node-mongo-cli

All Contributors

npm version Npm package total downloads contributions welcome CLI license: AGPL 3.0 API boilerplate templates license: ISC GitHub issues GitHub pull requests

node-mongo projects require you to have Node.js or Node Version Manager (NVM) installed on your computer

Supported Node.js versions: Node.js v16.x to v20.x

Operating Systems: Mac, Windows, and Linux OS

Parent repo: code-collabo/node-mongo

The latest version of CLI generates API boilerplate templates v1.0.0

The node-mongo-cli is a Command Line Interface made with Node.js. It bootstraps any of the node-mongo API boilerplate templates for your nodejs mongoDB development, depending on your preference.

Features

node-mongo

CLI

  • CLI bootstraps the typescript, es module, or common js (a.k.a. ts, esm, cjs) templates for nodejs mongoDB development.
  • Install dependencies and initialize git for the template bootstrapped or choose to skip them.
  • Folders are automatically created based on user entry in the prompt or command line.
  • The default folder name is used and incremented if the folder name provided already exists.

API boilerplate templates

  • API boilerplate templates now use the MVC architecture pattern i.e. separated route, model, controller, and service files.
  • Development environment already set up with @babel (for esm template only), eslint, and server watch.
  • The default connection setup type is MongoDB Atlas. You get to choose if you want to use Atlas or switch to the Local mongoDB connection setup type, and you also get to save your preferred connection setup type for when next you run the automated development server.
  • Improved user experience with the newly added walk-through prompts in the terminal: quick to setup, easy to use, with automated and improved user support.

CLI installation

Install CLI globally with this command:

npm install -g @code-collabo/node-mongo-cli

CLI command

After installing globally, use the node-mongo command.

node-mongo

CLI usage

node-mongo <folder_name> <template>

CLI usage example

Replace <folder_name> with your preferred folder name. Replace <template> with any of these: ts, esm, or cjs. The example below will bootstrap the ts template i.e. the typescript template into a folder named test-folder.

node-mongo test-folder ts

API boilerplate template and automated development server

See the API boilerplate templates documentation for detailed steps to setup your generated API boilerplate template, run the automated development server, and build your own mongoDB backend application with it.

Show CLI help

node-mongo --help

CLI flags

-h, --help          Show help
-v, --version       Show version number
-i, --install       Install dependencies
-g, --git           Initialize git repo
-s, --skip-install  Skip installing dependencies
-x, --skip-git      Skip initializing git
-y, --yes           No prompt: See note on --yes flag below

CLI prompts

If you do not specify one or both arguments above, you will be prompted to add your folder name and/or choose template option from list. For foldername, you can choose to use the default foldername provided in the prompt or type in your preferred folder name.

CLI skip prompts

No prompt when --yes flag is used. It skips both install and git init. The CLI will generate the (default) ts template if no template is specified or if the template entered is not in the template collection. In the case of folder name, default foldername is used if no folder name is specified or when the folder name used already exists.

Documentation

See the links to the official documentation of the node-mongo project and community building it below:

Appreciation

Appreciation to @dkundel, @academind, @CodAffection, @coryhouse for the awesome helpful course resources they create, and to @jiobiagba and @IsraelObiagba for their occasional but mighty contributions.

Contributors ✨

Thanks to these amazing contributors to the node-mongo-cli project. This project follows the all-contributors specification. See emoji key. Contributions of any kind welcome!