At work, we got tired of arguing over which bands were or were not butt rock, so we wanted an objective way to make the determination. Everyone could agree that Staind was the epicenter of butt rock, so this app uses Spotify's Related Artist API to build a tree of related artists seven degrees out from Staind to classify what's butt rock.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You will need to install a copy of Node.js to run this project. Download the appropriate installer for your system and follow the installation wizard. Note that the project was built using Node 10.15, though it probably should work on later versions and maybe on older versions.
You will also need to have either NPM or Yarn installed. NPM comes packaged with Node.js so you'll get that for free by installing Node.js. If you want to use Yarn download the appropriate installer and follow the installation wizard. Yarn should work fine, but note that the project was developed using NPM and the instructions are based on NPM.
Finally, you will need an instance of MongoDB. You can probably use one of Mongo's free cloud instances, but the project was developed using a copy of MongoDB locally. MongoDB is primarily used for secure, server-side storage of session data so that the access token and refresh token returned from Spotify don't have to be stored client-side in something like a cookie.
npm install
mongodb://localhost:1234/my-seven-degrees-of-staind-dev-db-cluster
mongod --dbpath='path/to/your/data/directory'
npm run watch
to compile the TypeScript server and client code into JavaScript that Node can run. This command runs the server behind nodemon so the server gets restarted on all changes and also ensures that the client code gets re-overlayed on all changes.You should now be able to access the app on localhost:3000.
There are two ways you can get some butt rock related artists imported into your development database:
mongoimport --uri ${process.env.DB_CONN_STRING} --collection relatedartists --drop --jsonArray --file ./related.json
command from the root of your Seven Degrees of Staind project.node ./server/dist/scripts/cron/updateButtRockGraph
from the root of your Seven Degrees of Staind project.mongodb://localhost:1234/my-seven-degrees-of-staind-prod-db-cluster
mongod --fork --dbpath ~/data/db
npm install pm2 -g
sudo pm2 start bin/www --watch --name butt-rock
sudo pm2 startup
sudo pm2 save
to complete the process of daemonizing the appPlease read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project adheres to semantic versioning.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.txt file for details
TODO