This repository is an academic run through of using the mysql npm package.
This is a CLI only node project. Commands are entered in the CLI to perform queries against a mysql database.
- Clone this repository
- npm init
- npm install
- Create Database from sqlSchema/schema.sql
- mysql workbench recommended
- Import data to top5000 from sqlSchema/TopSongs.csv
- Set connection config in topSongs.js with your database credentials
Commands follow this format:
node topSongs.js [command] [optional param]
- Query by Artist, ex:
node topSongs.js byArtist Katy Perry
- Query Top Ten Songs,
node topSongs.js topTen
- Query Top Ten Artists,
node topSongs.js popular