Skip to content

Lambda function for displaying a random song from Spotify playlist

Notifications You must be signed in to change notification settings

asynchroza/bzhlvvvs-spotify

Repository files navigation

bzhlvvvs-spotify .github/workflows/cicd.yaml

Yo, nice to see you there! 👋
This is the github repo containing the source code of the random Spotify song picker you're probably coming from. 🔥

If you're interested in creating your own lambda using this one as a template, don't hesitate to reach out to me with any questions you may have.
I'll be happy to help! 🤓

Anyway, I'm off to work now! 🌴🔨🥥

Lambda URL
Playlist URL

Documentation:

Environment Variables:

Before running or deploying the lambda, you need to create a copy of the sample env file called .env.spotify and place it in the src directory:

cp src/.env.sample src/.env.spotify
  • CLIENT_ID and CLIENT_SECRET are the corresponding client id and client secret of your spotify app. The lambda is using client credentials flow for authorizing towards Spotify's API. (REQUIRED)

  • TITLE is the title you want the generated static page to have. (REQUIRED)

image

  • FAVICON_URL is the url pointing to the location of your favicon. If left empty, your page won't have a favicon.
FAVICON_URL="https://personal-misho.s3.eu-north-1.amazonaws.com/favicon.ico"  # I am using an S3 bucket to host my favicon
  • PLAYLIST_ID is the id of the playlist you want to fetch songs from. (REQUIRED)
    To obtain the ID of your playlist, you can click on the three dots icon located next to your playlist. Then, copy the URL of the playlist:

image image

  • LINKEDIN and GITHUB are links to your socials. If left empty, icons won't be rendered when page is shipped.
LINKEDIN="https://www.linkedin.com/me/mbozhilov/"
GITHUB="https://github.com/asynchroza/bzhlvvvs-spotify"

About

Lambda function for displaying a random song from Spotify playlist

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published