This project lets you fetch and display the SVG image of the currently playing track from Apple Music.
- Node 14
- npm
- An Apple Music developer token
-
Clone the repo and install the dependencies:
git clone https://github.com/your-username/apple-music-now-playing.git cd apple-music-now-playing npm install
-
Create a
.env
file in the root directory. We'll get back toUSER_TOKEN
later.DEVELOPER_TOKEN=your_developer_token USER_TOKEN=your_user_token
-
Build and start the client app to retrieve the Apple Music user token:
npm run build:client npm run client
-
Open the client app and click "Login with Apple Music." After successful authentication, click "Check Authorization" to display the user token on the page.
-
Copy the user token and add it to
.env
. -
Start the express server to display the SVG widget:
npm run dev
-
Deploy to Vercel:
vercel