Youtube-sharing is a web application that allows users to share videos from YouTube
Visit https://youtube-sharing.vercel.app/
- Register - Log in
- Share videos from YouTube
- Notification when someone shares a video (When user logged)
Youtube-sharing requires Node.js v14.20.1+ to run.
Clone repository
git clone https://github.com/AlexNguyenz/youtube-sharing.gitInstall the dependencies and devDependencies and start the server.
Change network access on mongo atlas

Paste URI into mongoDB compass

cd youtube-sharing-beCreate file .env
API_KEY_YOUTUBE=
MONGO_URI=
URL_FE=http://localhost:3000
JWT_SECRET_KEY=
NODE_ENV=development
PORT=8080| Key | Value |
|---|---|
| API_KEY_YOUTUBE | create api key youtube |
| MONGO_URI | paste URI from mongo atlas |
| URL_FE | client url on local |
| JWT_SECRET_KEY | random string |
| NODE_ENV | mode env |
| PORT | server port on local |
Create init data
npm run seedingStart server
npm run install
npm run devInstall the dependencies and devDependencies and start the client.
cd youtube-sharing-feCreate file .env
BASE_URL_LOCALHOST=http://localhost:8080
MODE=development| Key | Value |
|---|---|
| BASE_URL_LOCALHOST | url server on local |
| MODE | mode env |
npm run install
npm run devVisit: localhost:3000
Your system needs to have Docker and Docker Composed installed.
Start the whole system including MongoDB, backend, frontend servers and Mongo Compass:
docker-compose up -dTo load initial data to mongodb:
docker-compose exec server node src/seedData.jsIn order to view db visit:
http://localhost:28081/
username: admin
password: secret
cd youtube-sharing-beCreate file .env
API_KEY_YOUTUBE=
MONGO_URI=mongodb://user:password@youtube-sharing-mongodb/youtube?authSource=admin&authMechanism=SCRAM-SHA-1
URL_FE=http://localhost:3000
JWT_SECRET_KEY=
NODE_ENV=development
PORT=8080| Key | Value |
|---|---|
| API_KEY_YOUTUBE | create api key youtube |
| MONGO_URI | keep value |
| URL_FE | client url on local |
| JWT_SECRET_KEY | random string |
| NODE_ENV | mode env |
| PORT | server port on local |
Visit: localhost:3000
- When you access the website, you will see a list of videos that others have shared before
- You need to log in, or register (if you don't have an account yet) to receive notifications and be able to share the videos you want with everyone
Note:
- You can only receive notifications and share videos after logging in to the website
- When you log out and log back in, the previous notifications will still be retained
- Notifications are sent only and not stored in the database, so when you refresh the page or log in from a different location, the old notifications will no longer be available
Sometimes when you first access the app, it may take 5-10 minutes for the server to start up. After that, please reload to use it normally.
The error occurs because: Within a certain period, if no requests are made, the server will automatically shut down. Then, when a request comes in, it takes about 5-10 minutes to start up. Because I am using a free web service, downtime may occur. I apologize for any inconvenience this may cause.
MIT

