Sankar Samiksha
Poon Yan Xin Melise
Marcus NG Li Wang
Anagha Ani
Arushi Bansal
Ng Jun Han
Submitted to Nanyang Technological University (Singapore) on 1 Nov 2021
You have the following installed:
- pip
- python3
- git
If you are using ubuntu
$sudo apt-get install git-all
If you are using windows
Download git from here
Follow the instructions from here
If you are using MacOS
Download git from here
Follow the instructions from here
Check if you have downloaded git:
Open command prompt/terminal
> git --version
Open command prompt / terminal (this instruction set follows Windows cmd prompt, this could vary if you are using another OS terminal)
> cd desktop
> git clone https://github.com/S-Samiksha/CX2006_Coding.git
> cd cx2006_coding
> pip install -r requirements.txt
From the following website download mySql
After downloading MySql, creating a password, you will need to use it later.
Set it as the following:
Username = root
and password = password
if you are using another username or password, open auth.py to change.
cur = mysql.connector.connect(user='root', password='password',
host='localhost',
database='cz2006')
Change the password, user if needed change localhost (most likely do not need to)
Now, do the following:
1. Open MySql Command Line Client
2. Enter password
3. Run the following commands:
mysql> DROP DATABASE cz2006;
mysql> CREATE DATABASE cz2006;
mysql> use cz2006;
mysql> source C:\Users\<user_name>\Desktop\cx2006_coding\db\cz2006_accounts.sql
mysql> source C:\Users\<user_name>\Desktop\cx2006_coding\db\cz2006_chat_data.sql
mysql> source C:\Users\<user_name>\Desktop\cx2006_coding\db\cz2006_profile.sql
mysql> source C:\Users\<user_name>\Desktop\cx2006_coding\db\cz2006_roommate_language.sql
mysql> source C:\Users\<user_name>\Desktop\cx2006_coding\db\cz2006_user_language.sql
Note: if you have stored the file cx2006_coding in a different folder, remember to change the pathfile accordingly
<user_name> has to be changed to your own
4. Close the SQL command client
mysql> exit
Prerequisite: You are already connected to server
Firstly, create a new schema called cz2006 (case sensitive).
In the menu bar go to server --> data import --> select the cx2006_coding/db
folder --> import
Go back into the command prompt/terminal
make sure you are in the CX2006_coding folder
> python main.py
OR
> python3 main.py
This should generate the following ip address: http://127.0.0.1:5000/
Cope and paste into your web browser.
press ctr + c to stop the server.
> exit