Create your SVG file with your current played song on Spotify.
This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.4.1
v8.16.0
BEFORE YOU INSTALL: please read the prerequisites
Start with cloning this repo on your local machine:
$ git clone https://github.com/conejerock/spotify-svg.git
$ cd spotify-svg
To install and set up the library, run:
$ yarn install
At first, you must to create an Application as a Spotify developer.
When you register the app, create an .env
file with
SPOTIFY_CLIENT_ID=<spotify_client_id>
SPOTIFY_CLIENT_SECRET_ID=<spotify_client_secret_id>
EXPRESS_HOSTNAME=localhost
EXPRESS_PORT=8888
EXPRESS_CALLBACK=callback
EXPRESS_SVG_PATH=current-spotify.svg
- SPOTIFY_CLIENT_ID - Client ID provided by Spotify Application
- SPOTIFY_CLIENT_SECRET_ID - Client Secret provided by Spotify Application
- EXPRESS_HOSTNAME - Hostname where the server will be created (default: localhost)
- EXPRESS_PORT - Port where the server will be created (default: 80)
- EXPRESS_CALLBACK - Redirect URI where Application Spotify redirect after authentication success (default: callback)
- EXPRESS_SVG_PATH - URI to access your final SVG file (default: current-spotify.svg)
To create token, with .env configured, run:
$ yarn create-token
And click on link to acquire the Spotify application token
Finally, to run app with token saved, run:
$ yarn start
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😎
MIT License © Juanjo Conejero