This is the API code for the website project Teatime music
TeaTime music is a website that helps you get audio from youtube videos. Like any music stream service, you can search music, stream your favorite songs and create playlists for your favorites.
Visit live application on heroku:
https://stayhome-ui.herokuapp.com/music
For Front-end code, visit:
https://github.com/Dalanke/youtube_audio_UI
Want to build your own React music player? Check the player component I used in this project:
https://github.com/Dalanke/react_audio_player
A brief introduction of website feature:
User guide
Creat .env
file and sets a variable per line for local testing:
# cloud MongoDB url
DB_URL=<your mongoDB url>
# ReCAPTCHA 2.0
RECAPTCHA_KEY=<your ReCAPCHA key>
# port default to 777
PORT=<assigned api server port>
- Clone API repo and install dependency, configure
.env
file:npm install npm start
- Clone UI repo and install dependency, configure
.env
filenpm install # comment out if test in localhost REACT_APP_API_ENDPOINT=https://stayhome-api.herokuapp.com/graphql npm start
The streaming service might not be reliable due to the restriction of heroku, we recommend test on localhost to get better experience.
Check GraphQL.md for API example and details