Skip to content

sathvi-k/coursesearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Setup MySQL Database

  • 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!

2. Setup Node.js Backend

  • 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!

3. Setup React Frontend

  • 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!

4. Use the Course Search database!

  • 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!

About

A "course database" where you can store information about students and what class they're taking!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors