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:
- ES module template
- Commonjs template
- Typescript (coming soon)
- 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.
- 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.
Install CLI globally with this command:
npm install -g @code-collabo/node-mongo-cli
After installing globally, use the node-mongo command.
node-mongo
node-mongo --help
node-mongo <folder_name> <template>
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
-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
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.
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.
See the links for the official node-mongo documentation and Code Collabo documentation.
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 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 π§βπ« |
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 π |