JasonPuglisi / descent

Elegant now playing display for Last.fm showing song metadata and local weather.
https://descent.live
MIT License
123 stars 21 forks source link

Spotify: No API Credentials #162

Closed pete2583 closed 5 months ago

pete2583 commented 5 months ago

Hey, I imagine it's something I'm doing wrong but I can't get it to connect to Spotify.

Where exactly am I supposed to put my client id and secret? Perhaps I've put it in the wrong place, it's not overly clear in the ReadMe.

Cheers

JasonPuglisi commented 5 months ago

They should go in the SPOTIFY_CLIENT and SPOTIFY_SECRET environment variables

pete2583 commented 5 months ago

Yeah, I thought that.

As in replace every time they are mentioned?

Sorry, I know I'm being dumb but I'm fairly certain I put them in the right place but every time it runs out days no api

pete2583 commented 5 months ago

Or just lines 18/19 on server js?

JasonPuglisi commented 5 months ago

You don’t need to modify the code at all! Environment variables are set in your terminal and the program picks them up automatically. For example, here’s some instructions to set environment variables on Linux: https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-linux

Might be different depending what operating system you’re using.

pete2583 commented 5 months ago

Oh jeez, that makes total sense. I knew I was being dumb but just couldn't get my head around it the other day. Granted I think a few beers had been consumed lol