Music tube is a music video display application which periodically updated the videos from the YouTube Data API.
- Backend with Express framework for Node.js
- Frontend with React (with MaterialUI components)
- MongoDB for database (Used mongoose for modelling)
- Server is dockerized (MongoDB connection is required to run the server image)
For exact dependencies used frontend and backend, checkout frontend's package.json and backend's package.json
Git, Docker
- Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
- After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
- Go to the API Console and select the project that you just registered.
- Visit the Enabled APIs page. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
The following environments variables are required.
PORT
: port on which server communicatesYOUTUBE_API_KEY
: key obtained earlierDB_URI
: mongodb server uri Instead ofDB_URI
, seperate elements of it can be used: DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME
-
A build can be run as a container with docker. (Remember to set the environment variables required) Refer Docker documentation for different uses of an image
-
For running locally without bothering about setting up MongoDB, use j-tesla/music-tube
Dashboard is avaialble at root url and API endpoint for videos is at /api/videos