This is a Next.js project bootstrapped with create-next-app
.
Now Playing on Spotify
Read setup-guide to get started with Spotify API
-
Clone the repository
# Clone with SSH $ git clone [email protected]:manjillama/spotify-now-playing-widget.git # Or with HTTPS $ git clone https://github.com/manjillama/spotify-now-playing-widget.git
-
Install dependencies Navigate into newly cloned folder and install dependencies.
cd spotify-now-playing-widget/ npm install
-
Configuration In the root project folder, copy the
.env.local.example
and save as.env.local
. Update the variables. -
Start developing. Run the development server:
npm run dev # or yarn dev # or pnpm dev # or bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying
pages/index.tsx
. The page auto-updates as you edit the file.API routes can be accessed on http://localhost:3000/api/now-playing. This endpoint can be edited in
pages/api/now-playing.ts
.The
pages/api
directory is mapped to/api/*
. Files in this directory are treated as API routes instead of React pages.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
This project includes code snippets from the following open-source projects:
-
natemoo-re
- Author: Nate Moore
- Original Source: natemoo-re
-
JoshLmao now-playing-profile
- Author: Josh Shepherd
- Original Source: now-playing-profile