New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mern-project-cli

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mern-project-cli

A CLI tool to scaffold a MERN stack project

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by225%
Maintainers
0
Weekly downloads
 
Created
Source

MERN Project Generator CLI

Generate a complete MERN stack project with a single command! 🚀

npm npm

MERN Project Generator CLI is a powerful command-line tool designed to jumpstart your MERN (MongoDB, Express, React, Node.js) stack projects. With just one command, you can scaffold a complete project structure for both backend and frontend, following best practices and including essential configurations.

Key Features

  • Full MERN Stack Setup: Generate both backend and frontend projects in one go.
  • Best Practices Built-in: The generated projects follow industry-standard best practices for MERN stack development.
  • Customizable: Easy to extend and customize to fit your specific project needs.
  • Instant Development Ready: Start coding your application logic immediately after generation.

Installation

To install the CLI globally, use npm:

npm install -g mern-project-cli

Usage

To create a new MERN project, run:

mern-project-cli your-project-name

Replace your-project-name with your desired project name.

Generated Project Structure

The CLI generates the following structure:

your-project-name/
├── backend/
│   ├── controllers/
│   ├── db/
│   ├── middlewares/
│   ├── models/
│   ├── routes/
│   ├── utils/
│   ├── .env.example
│   ├── .gitignore
│   ├── constants.js
│   ├── package.json
│   ├── README.md
│   └── server.js
└── frontend/
    ├── (Create React App structure)
    └── .env.example

Features

Backend

  • Express.js server setup
  • MongoDB connection ready (using Mongoose)
  • Environment variable configuration
  • Basic error handling
  • Modular architecture

Frontend

  • Create React App setup
  • Environment variable configuration

Getting Started

After generating your project:

  1. Navigate to the backend directory:

    cd your-project-name/backend
    
  2. Create a .env file based on .env.example and configure your environment variables.

  3. Start the backend server:

    npm run dev
    
  4. In a new terminal, navigate to the frontend directory:

    cd your-project-name/frontend
    
  5. Start the React development server:

    npm start
    

Customization

Feel free to modify the generated files to fit your specific project requirements. The structure is designed to be easily extendable.

Requirements

  • Node.js 14.x or higher

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.


Made with ❤️ by Manish Raj

Portfolio GitHub LinkdIn Twitter

Keywords

FAQs

Package last updated on 17 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc