Compare commits

..

No commits in common. "main" and "develop" have entirely different histories.

6 changed files with 8 additions and 20 deletions

1
.gitignore vendored
View File

@ -165,4 +165,3 @@ dist
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node
**/server/public/**

View File

@ -4,13 +4,13 @@ Sports Matcher is an application that allows users to connect with other athlete
**Built Using**
It is built using the React framework and React Bootstrap library. It uses MongoDB for the database, Express for the server, and Axios for requests.
It is built using the React framework and the Material UI and React Bootstrap libraries.
**Instructions**
To use Sports Matcher, please go to https://hidden-bayou-86321.herokuapp.com
To use Sports Matcher, navigate to the sports-matcher directory in the repository and run the commands `npm i` and `npm start` in order. This should launch a localhost window in your browser which shows the homepage.
From here you can Sign In or Sign Up.
From here you can Sign In to your account using the username "admin" and password "admin" OR using the username "user" and password "user" as specified in the handout.
Signing in as 'admin' will take you to the admin page. You will be able to see a list of current matches, users and suspended users. You will need to click the appropriate button for the correct table to appear.
@ -18,14 +18,4 @@ Every page has a navbar at the top. There is a chat and profile icon. Clicking o
**Functionality**
Our app has a fully functioning backend which supports the CRUD functionality for the following entites
1. We have a User entity which has the following attributes: Name, Email and Password, Sports and levels, Griends, Auth level, and suspended status
2. We have a Match which supports the following attributes: Players, Date, Sport and skill, and Location
We also support searching the database for the above entites.
1. Matches can be searched for. They can be sorted and filtered based on location, friends, skill level and date.
2. Users can also be searched for

View File

@ -18,7 +18,7 @@
},
"scripts": {
"start": "NODE_ENV='development' REACT_APP_API_HOST='http://localhost:5000' react-scripts start",
"build": "python3 ../scripts/build.py",
"build": "../scripts/build.py",
"test": "react-scripts test",
"eject": "react-scripts eject"
},

2
sports-matcher/scripts/build.py Executable file → Normal file
View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/python
import os
import shutil

View File

@ -14,7 +14,6 @@ const sessionConf = {
};
if (process.env.NODE_ENV === "production") {
sessionConf.cookie.secure = true;
sessionConf.proxy = true;
sessionConf.store = MongoStore.create({ mongoUrl: mongoURI, dbName: mongooseDbName });
}
export const userSession = session(sessionConf);

View File

@ -7,7 +7,7 @@
"main": "server.js",
"scripts": {
"develop": "NODE_ENV=development nodemon server.js",
"start": "NODE_ENV=production MONGODB_URI='mongodb+srv://sports-matcher:PFebEO0btV91HjwF@cluster0.bow9f.mongodb.net/myFirstDatabase?retryWrites=true&w=majority' node server.js",
"start": "NODE_ENV=production node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",