easy-node-init
v1.0.2-beta.4
Published
Kickstart your Node.js projects effortlessly using this CLI tool that automates project initialization and module integration.
Downloads
1
Readme
Easy Node Initializer
Fast-track your Express.js and Mongoose-based API development with ease!
The Easy Node Initializer is a powerful tool designed to simplify the process of creating Express.js APIs integrated with MongoDB using Mongoose. Say goodbye to hours of manual configuration and file setup – with just a few simple commands, you can have your API up and running in seconds.
Getting Started
Install nodemon by running the following command in your project directory or modify it according to your ease:
npm i -g nodemon
Installation
Certainly! Here's the command for installing an npm package globally in Markdown format:
On Windows (run as Administrator):
npm install -g easy-node-init
On Linux/macOS (using sudo for superuser privileges):
sudo npm install -g easy-node-init
To set your secret key in an environment variable run the command:
export easynodeinti_jwtPrivateKey=<your-secret-key>
To enable debugging:
export debug=app:*
To start the server:
npm start
To run tests:
npm test
Make sure to replace <your-secret-key>
with your actual secret key when setting the easynodeinti_jwtPrivateKey
environment variable.
Usage
Initialize Basic Express Setup
Use the following command to initialize a basic setup for an Express-based API:
eni setup
Initialize Basic Express Setup
Initialize Basic Mongoose Setup
To set up essential files for Mongoose, execute the following command:
eni db-setup
Initialize User Module
Create a user module with all the required functions, along with test files, using the following command:
eni auth
Create a New Module
Generate a module with auto-generated controller, module, route, and integration test for it by running the following command, replacing <module-name>
with your desired module name:
eni create-module <module-name>
Create a New Controller
Create a new controller with auto-generated routes and integration tests by using the following command, replacing <controller-name>
with your desired controller name:
eni create-controller <controller-name>
License
This project is licensed under the MIT License - see the LICENSE file for details.