Skip to content

rajxode/twitter-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

twitter-clone

This is a twitter-clone project made using MERN STACK.

Installation and Run:

Follow the following instruction to run the code on your system.

  • Get the code on your pc.
  • Open terminal and navigate to the root directory of the code.

for BackEnd

  • run command 'cd server' inside the terminal to navigate to the server(backend) folder.
  • run 'npm install' command inside the terminal to install all backend dependenices.
  • After complete installation, create '.env' file inside the server directory and define the following variables inside the .env file (server)
    • PORT = the localhost port of your backend code
    • MONGODB_URL = Database url
    • JWT_SECRET_KEY = a secret key for jsonwebtoken
    • JWT_EXPIRY = expiry time for token
    • COOKIE_EXPIRE = expiry time for cookies

    Note: Create an account on cloudinary ( in case you don't have one )

    • CLOUD_NAME = Cloudinary account name
    • CLOUD_API_KEY = Cloudinary api key
    • CLOUD_API_SECRET = Cloudinary api secret key
    • CLOUD_USER_FOLDER = Folder name to store user's photos
    • CLOUD_POST_FOLDER = Folder name to store post's photos
    • CLIENT_URL = localhost address of frontend ( http://localhost:3000 )

for FrontEnd

  • run command 'cd..' to go back to parent directory.
  • run command 'cd client' inside the terminal to navigate to the client(frontend) folder.
  • run 'npm install' command inside the terminal to install all frontend dependenices.
  • After complete installation, create '.env' file inside the client directory and define the following variables inside the .env file (client)
    • REACT_APP_BASE_URL = localhost address of backend server

twi twi2 twi3 twi4 twi5 twi6