Skip to content

najmul-islam/mern-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 MERN Stack

MongoDB, Expressjs, React, Nodejs

MERN is a fullstack implementation in MongoDB, Expressjs, React, Nodejs.

MERN stack is the idea of using Javascript/Node for fullstack web development.

clone or download

$ git clone https://github.com/Najmul-Islam/mern-boilerplate.git
$ npm i

project structure

backend
    /config
        /db.js
    /controllers
        /index.js
    /middlewares
        /errorMiddleware.js
    /models
        /index.js
    /routes
        /index.js
    server.js
frontend
    /public
    /src
        /components
            /Home.jsx
        /pages
            /Home.jsx
        App.js
        index.js
        package.json
        README.md
.env
    NODE_ENV=development
    PORT=5000
    MONGO_URI=your mongo uri gose to here
.gitignore
package-lock.json
package.json
README.md
...

Usage (run fullstack app on your machine)

Prerequisites

Client-side usage(PORT: 3000)

$ cd frontend   // go to frontend folder
$ npm i       // npm install packages

Server-side usage(PORT: 5000)

run the script at the first level:

(You need to add a .env file and add NODE_ENV=development PORT=5000 MONGO_URI=your mongo uri gose to here  to connect to MongoDB)

### Start
go to root folder
$ npm i             // npm install packages
$ npm run server    // run only backend
$ npm run client    // run only frontend
$ npm run dev       // run backend and forntend concurrently

About

mern boilerpalte for my work

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published