Collect your favorite musics!

The project

Have you ever asked someone for the title of a piece of music you hear, which you forget shortly afterwards? Have you ever spotted music that you like, only to forget its title? If this has already happened to you, this site offers you a solution to collect and store the name of all the music you like and want to remember!

The method

Definitions and tools

Firstly, we need to understand what is a database, because this is what we will use to store the musics we like !

Formally, a database refers to a set of related data and the way it is organized. To access this data and organize it the way we want, we'll use a tool : Firebase.



If you want to know more about databases, you can go watch this video.

How do we use Firebase ?

To access our database, we just need this line:

var database = firebase.database()

At first, we need to create a Realtime database on Firebase (you can follow the instructions on the website directly).

After that, we can link the database we just created to our Glitch. At the end of the body part, we must then copy a link that can be found on our Firebase. It should look like this :


Firebase Database uses "References" to represent specific locations in our DB. References are used for reading or writing data. For example, we could create a reference pointing to the title and singer of the music like this:

var lovecraftRef = db.ref( "Music" );
MusicRef.set( {
Title: "Ocean eyes",
Singer: "Billie Eilish"
} );

Then, what should appear on Firebase should be like that :

And... you're all set !

Then, you're ready to put all your data in Firebase to store it ! This technic is very useful for every person who listens to music... And we can assume that there are many of them! Enjoy all your music now!