CSI-280 / MusicGames

0 stars 0 forks source link

Extended Play :musical_note:

The focus of this project is to create a website where you play minigames to make “money” and spend it on adding songs to a music playlist Some of these games include:

Some features this site will have are:

Since we are logical developers, living in the 21st century, we will be using web frameworks with this project:


APIs

With this project, we will be using a number of APIs:


Setup

It's recommended that you use git bash for cloning the repo and installing dependencies.

Clone the repo

To get the actual code for this, you need to clone the repo. To clone the repo, simply enter the command

git clone https://github.com/CSI-280/MusicGames.git

Then to get to the folder, simply do cd Musicgames

Install Dependencies

As previously mentioned, this project uses Django and React. So we need to install those dependencies in order to run this on your local machine. Run these commands to install them.

pip install django djangorestframework virtualenv django-cors-headers

cd .\frontend\gui

npm install

npm istall react-router-dom jquery react-google-login axios

You might need to update package.json

You can find this file in frontend/gui/package.json

Open the file. We only need to modify a single line in this file.

This is what it will look like before (if its wrong)

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

The fix for this is simple, all you have to do is change one line:

"scripts": {
    "start": "set HTTPS=true&&react-scripts start", //This is the updated line!!
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

We need to change this in order to use the Google Sign-In api so it is important that you do this, or else you won't be able to sign in!

Start up the front and back end

Now you should be able to run the files. For the front end, use

cd .\frontend\gui

npm start

for the backend, in a new terminal in the project directory

python backend\src\manage.py runserver


Team Members


License

MIT