This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 303
Home
Manikandan edited this page Jan 15, 2021
·
1 revision
- Clone the backend repo
git clone https://github.com/manikandanraji/youtubeclone-backend
# navigate to the root directory
cd youtubeclone-backend
- Database connection using ElephantSQL
- ElephantSQL is a PostgreSQL database hosting service
- Signup for ElephantSQL using this link
- Watch this video about creating an postgresql instance
- Create a .env file at the root directory with the following contents
JWT_SECRET=pewdiepie # opt for more secure secret
JWT_EXPIRE=30d
DATABASE_URL=[YOUR_DB_CONNECTION_URL]
- Installing the dependencies
npm i
- Running the server locally
npm run dev # server started running at http://localhost:5000
- Clone the frontend repo
git clone https://github.com/manikandanraji/youtubeclone-frontend
# navigate to the root directory
cd youtubeclone-frontend
- Cloudinary setup and adding upload preset
- Cloudinary is a cloud-based image and video hosting service
- Signup for cloudinary using this link
- Watch this video about setting up upload preset in cloudinary
- Create a .env file at the root directory with the following contents
REACT_APP_BACKEND_URL=http://localhost:5000/api/v1/ # make sure you're running the backend locally
REACT_APP_CLOUDINARY_ENDPOINT=https://api.cloudinary.com/v1_1/<YOUR_CLOUD_NAME>
- Installing the dependencies
npm i
- Start the frontend
npm start # http://localhost:3000