Skip to content

📦 The mern CLI is a command-line interface tool that helps you to initialize, develop, and maintain your mern-skeleton project.

License

Notifications You must be signed in to change notification settings

mirsahib/mern-skeleton-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mern-Skeleton-Cli

Description

The mern CLI is a command-line interface tool that helps you to initialize, develop, and maintain your mern-skeleton project.

Installation

npm install -g mern-skeleton-cli

What is MERN-Skeleton

MERN-Skeleton a skeleton application with basic user CRUD and auth features - developed using React, Node, Express and MongoDB
MERN-Skeleton Repo

Command Structure

Command Option Description
mern create -p,--project <name> Create a new project eg: mern create -p myproject
mern create -m,--model <name> Create a new model eg: mern create -m company
mern create -c,--controller <name> Create a new controller eg: mern create -c company
mern create -r,--router <name> Create a new routes eg: mern create -r company

Finally add the routes to server/express.js

import express from 'express'
import path from 'path'
import bodyParser from 'body-parser'
import cookieParser from 'cookie-parser'
import compress from 'compression'
import cors from 'cors'
import helmet from 'helmet'
import Template from './../template'
import userRoutes from './routes/user.routes'
import authRoutes from './routes/auth.routes'
import CompanyRoutes from './routes/company.routes' <=== import your routes here


....

// mount routes
app.use('/', userRoutes)
app.use('/', authRoutes)
app.use('/',CompanyRoutes) <===== add your routes here

....

export default app

Contribution

Project Installation

git clone https://github.com/mirsahib/mern-cli.git
cd mern-cli
npm i

// add command
cd bin
node index <your command structure> //eg: node index create -p test

If you want to contribute and make this project much better for other developer have a look at Issues.

If you created something awesome and want to contribute then feel free to open a pull request.

Special Thanks

Shama Hoque for creating MERN-Skeleton

About

📦 The mern CLI is a command-line interface tool that helps you to initialize, develop, and maintain your mern-skeleton project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published