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 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-nodejs-app-template

v1.0.9

Published

[![npm version](https://img.shields.io/npm/v/create-nodejs-app-template.svg)](https://www.npmjs.com/package/create-nodejs-app-template) [![license](https://img.shields.io/npm/l/create-nodejs-app-template.svg)](https://github.com/umairabbas786/create-nodej

Readme

create-nodejs-app-template

npm version license

A CLI tool to quickly scaffold a Node.js project with a predefined structure and essential dependencies.


Features

  • 📦 Pre-configured Node.js project structure (MVC pattern)
  • 🔑 Authentication setup (JWT, bcrypt)
  • 📧 Nodemailer integration for emails
  • ☁️ Cloudinary integration for image uploads
  • Form validation with express-validator
  • 🌐 CORS and dotenv setup
  • 🚀 Nodemon for easy development

Installation

To install the package globally via NPM, run:

npm install -g create-nodejs-app-template

Or, use without installation via NPX:

npx create-nodejs-app-template myProjectName

Usage

To create a new Node.js project, run:

npx create-nodejs-app-template myNewProject

Options and Rules:

  • The project name must be in camelCase (e.g., myProjectName).
  • Spaces and special characters are not allowed.
  • The project name will be converted to lowercase in package.json.

Project Structure

After successful setup, the project will have the following structure:

mynewproject/
├── src/
│   ├── controllers/
│   ├── routes/
│   ├── services/
│   ├── models/
│   ├── config/
│   ├── index.js
├── .env.example
├── .gitignore
├── package.json
├── README.md
├── app.js
├── server.js
└── config.js

Commands

After creating the project, navigate to the directory and run:

cd mynewproject
npm install
npm run dev

Available scripts:

  • npm start – Start the server.
  • npm run dev – Run the server in development mode using Nodemon.

Environment Variables

Create a .env file from .env.example and configure the required environment variables:

PORT=5000
MONGO_URI=mongodb://localhost:27017/myapp
JWT_SECRET=mysecretkey
MAIL_SERVICE=gmail
[email protected]
MAIL_PASS=your-password
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

API Endpoints

User Routes

| Method | Endpoint | Description | |--------|-------------|---------------------| | GET | /api/users | Get all users | | POST | /api/users | Create a new user |

Utility Routes

| Method | Endpoint | Description | |--------|------------------|--------------------------| | POST | /api/utils/upload | Upload an image to Cloudinary | | POST | /api/utils/send-email | Send an email via Nodemailer |


Dependencies

The template comes pre-installed with the following key dependencies:

  • Express – Web framework for Node.js
  • Mongoose – MongoDB ODM
  • JWT – JSON Web Token authentication
  • BcryptJS – Secure password hashing
  • Cloudinary – Cloud image storage
  • Multer – File uploads
  • Nodemailer – Email sending service
  • Dotenv – Environment variable management
  • CORS – Cross-origin resource sharing

Troubleshooting

If you encounter any issues while creating the project, try the following:

  1. Ensure you're using Node.js v14+.

  2. Run the command without spaces in the project name.

  3. Delete any previously created project folder before re-running the command:

    rm -rf mynewproject
  4. Clear the NPM cache and try again:

    npm cache clean --force

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository on GitHub.
  2. Clone your fork locally.
  3. Create a new branch (git checkout -b feature-branch).
  4. Commit your changes (git commit -m "Add feature").
  5. Push to your fork and create a pull request.

License

This project is licensed under the ISC License. See the LICENSE file for details.


Support

If you find any issues or have suggestions for improvement, feel free to open an issue on GitHub:

GitHub Issues


Author

Developed with ❤️ by CODEFLAMME


Related Projects

If you like this project, check out similar boilerplates:


Stay Connected

Follow me on: