Sync271 / node-mongo-cli

Nodejs command line interface to bootstrap 3 kinds of API boilerplate templates for your nodejs and/or mongoDB development.

Home Page:https://code-collabo.gitbook.io/node-mongo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@code-collabo/node-mongo-cli

All Contributors

npm version Npm package total downloads contributions welcome License: ISC GitHub issues GitHub pull requests

Supported node versions: node v12.x to v16.x

Operating Systems: Mac OS and Windows OS

The node-mongo-cli is a command-line interface made with nodejs. It bootstraps any of these 3 boilerplate templates for your nodejs and/or mongoDB development:

Features

node-mongo

CLI

  • CLI bootstraps the esm, cjs or ts templates for nodejs and/or mongoDB development.
  • Install dependencies and intialize git for the template bootstrapped or choose to skip them.
  • Folders are automatically created based on user entry in prompt or command-line.
  • Default folder name is provided and incremented if name already exists.

Templates

  • Development environment already set up with @babel (for esm template only) and eslint.
  • Two mongoDB connection options to pick from in the templates: your installed mongoDB and mongoDBatlas.
  • Demo CRUD app you can go and download to test that your connection is setup and show example usage of the templates.

Installation

Install CLI globally with this command:

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

Command

After installing globally, use the node-mongo command.

node-mongo

Show help

node-mongo --help

Usage

node-mongo <folder_name> <template>

Usage example

The example below will bootstrap the cjs template i.e. the common js template into a folder named test-folder.

node-mongo test-folder cjs

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           See note on --yes flag below

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.

Skip prompts

No prompt when --yes flag is used. It skips both install and git init, and uses esm template as default if no template is specified or if 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 folder name already exists.

Documentation

See the links for the official node-mongo documentation and Code Collabo documentation.

Want to contribute?

Love the project and wish to contribute? See contribution guide in the node-mongo documentation for how to start contributing. You can also reach out to @Ifycode in case you need any assistance.

Appreciation

Appreciation goes to @dkundel, @academind, @CodAffection, @coryhouse whose awesome youTube videos, articles and/or courses helped a lot while building the node-mongo project - cli, templates and/or demo app. Also to @IsraelObiagba and @jiobiagba for their help.


Dominik Kundel

πŸ§‘β€πŸ«

Academind

πŸ§‘β€πŸ«

CodAffection

πŸ§‘β€πŸ«

Cory House

πŸ§‘β€πŸ«

Israel Obiagba

πŸ§‘β€πŸ«

Joseph Obiagba

πŸ§‘β€πŸ«

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!


Obiagba Mary Ifeoma

πŸ’» πŸ“–

Chikezie Joachim

πŸ’»

Keithan Philander

πŸ›

Rashid

πŸ’»

All Contributors

πŸš‡

Muhammad Izhar

πŸ“–

About

Nodejs command line interface to bootstrap 3 kinds of API boilerplate templates for your nodejs and/or mongoDB development.

https://code-collabo.gitbook.io/node-mongo/

License:Other


Languages

Language:JavaScript 100.0%