-
Download the latest versions of MySQL and MySQL Workbench.
-
Clone this repo. Open MySQL Workbench and run the coursesearch.sql script. This should create a table that will be the course database!
$ git clone https://github.com/sathvi-k/coursesearch.git
-
Done!
-
Go to the backend folder then install all dependencies:
$ cd coursesearch/backend $ npm i -
Open app.js & edit these lines to configure your database:
const db = mysql.createConnection({ host : 'localhost', user : 'your_database_username (if you're using localhost, this is probably root)', password : 'your_database_password', database : 'your_database_name (should be CourseSearch)' });
-
Save it, then run your backend project. It will run at localhost:3210:
$ cd coursesearch/backend $ node app -
Note: If there is an error fetching data from the database or adding to the database, this server will close. Restart it by running it again.
-
Done!
-
Go to the frontend folder, install all the dependencies and then run this project:
$ cd coursesearch/frontend $ npm i $ npm start -
It will run at localhost:3000 & should open in the browser automatically! Done!
- After running the SQL script, there should be 4 entries in the coursesearch database. Add a few of your own by entering information and clicking the "Submit" button. Then, click the "Search" button to see all the entries, including the ones you've added! Look at the coursesearchscreen.png image to see an example of this. The SQL script added the first four people in the database, and I added the last entry (Ally Wood, who's taking Earth Science 80) to the database then clicked the "Search" button to see all 5 entries!