Skip to content

Lakhaninawaz/pinterest-clone-mern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pinterest Clone

MongoDB, Expressjs, React, Nodejs

Live Link: Pinterest Clone MERN

Pinterest Clone: A MERN Stack Implementation

This project is a full-stack implementation of a Pinterest clone, built with the MERN stack (MongoDB, Express.js, React/Redux, Node.js).

clone or download

$ git clone https://github.com/Lakhaninawaz/pinterest-clone-mern.git
$ yarn # or npm i

project structure

LICENSE
package.json
server/
   package.json
   .env (to create .env, check [prepare your secret session])
client/
   package.json
...

Usage (run fullstack app on your machine)

Prerequisites

notice, you need client and server runs concurrently in different terminal session, in order to make them talk to each other

Client-side usage(PORT: 3000)

$ cd client          // go to client folder
$ yarn # or npm i    // npm install packages
$ npm run dev        // run it locally

// deployment for client app
$ npm run build
$ npm run dev

Server-side usage(PORT: 3000)

Prepare your secret

run the script at the first level:

(You need to add a JWT_SECRET in .env to connect to MongoDB)

// in the root level
$ cd server
$ echo "DB_URI=YOUR_DB_URI" >> src/.env
$ echo "SECRET=YOUR_SESSION_SECRET" >> src/.env
$ echo "SECRET_KEY=YOUR_JWT_SECRET_KEY" >> src/.env

Start

$ cd server   // go to server folder
$ npm i       // npm install packages
$ npm start // run it locally