A music sharing app where you can share your favourite songs for your friends!
Have a look and post at music-app
Make sure you have Git and Node (v18) installed.
-
Clone this repo and cd into the directory
-
Run
npm install
to install all the dependencies -
Run
npm run dev
to start the server. Runnpm run dev-win
if using Windows. -
Run
npm run seed
to create the database. Runnpm run seed-win
if using Windows.
This uses the nodemon library to auto-restart the server when you save changes.
Testing in windows:
SET DB_FILE=test.sqlite & node -r ./src/database/seed.js --no-warnings --test
Test All:
npm run test
DB_FILE=test.sqlite node -r ./src/database/seed.js --no-warnings --test
Test 1:
npm run test:1
DB_FILE=test.sqlite node -r ./src/database/seed.js --no-warnings test/one.test.js
Test 2:
npm run test:2
DB_FILE=test.sqlite node -r ./src/database/seed.js --no-warnings test/two.test.js
Test 3:
npm run test:3
DB_FILE=test.sqlite node -r ./src/database/seed.js --no-warnings test/three.test.js
Test 4:
npm run test:4
DB_FILE=test.sqlite node -r ./src/database/seed.js --no-warnings test/four.test.js
- As a friendly user I want to post a song that I like for anyone to see
- As a curious user I want to see other people's favourite songs they posted about
Stretch goal:
- As a selfish user, I want to filter by user so I can see a collection of one person's favourite songs
- As an organised user, I want to sort all posted songs by rating
Our database contains two tables.
- Users - contains the usernames of everyone who has posted their favourite song so far
- Music - a list of all songs posted
The two tables follow the schema as shown below
Example database:
- A form for users to submit data
- A page showing all the data
- Semantic form elements with correctly associated labels
- A SQLite database
- A schema describing your database in your README
- Tests for server routes and database access
- Not process user input as SQL commands
- Hidden environment variables (i.e. not on GitHub)
- A way to view filtered/sorted data, instead of just all of it GitHub Actions CI setup to run your tests when you push