This is a twitter-clone project made using MERN STACK.
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.
- 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
- 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 )
- 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