Flask server of FriendMatch with mySQL database.
FriendMatch is a platform that finds you friends and suggests events based on your hobbies.
DBMS Project by Devipriya Sarkar and Namita Roy
- Setup a mySQL user with username
<your-mysql-database-user>
and password<your-mysql-database-password>
. - Create a database
<your-mysql-database-db>
. - Create the tables as in
mysql_files/schema/schema.sql
. - Create the stored procedures as in
mysql_files/stored_procedures
. - [Optional] For initial dummy data, data from
mysql_files/data
can be imported into respective tables.
- Make sure python 2.7 is installed on your system.
- Install all the packages in
requirements.txt
.
To install using pip, run pip install -r requirements.txt
.
- Update the variables in
setup.py
,
YOUR_MYSQL_DATABASE_USER = '<your-mysql-database-user>'
YOUR_MYSQL_DATABASE_PASSWORD = '<your-mysql-database-password>'
YOUR_MYSQL_DATABASE_DB = '<your-mysql-database-db>'
YOUR_MYSQL_DATABASE_HOST = '<your-mysql-database-host>'
- To run the application,
$ export FLASK_APP=app.py
$ flask run
* Running on http://0.0.0.0:5000/
If you are on Windows you need to use set instead of export.
Alternatively you can use python -m flask:
$ set FLASK_APP=app.py
$ python -m flask run
* Running on http://0.0.0.0:5000/
- On Windows, run
ipconfig
on command prompt and note down the IPv4 Address<ip-address>
.
On Linux, run ifconfig
instead.
- Now head over to
http://<ip-address>:5000
to test if server is running.
Now you should be able to run the Android app of FriendMatch. Download from [here] (https://github.com/DevipriyaSarkar/FriendMatch-Frontend/releases) and if you want to run the app on the local server just set up, click on "Have a local server?" and enter <ip-address>:<endpoint>
in the input field, eg. 192.168.1.107:5000
.
The content of this repository is licensed under MIT LICENSE.