Snackability Backend

Installation Video: 
    https://youtu.be/2tF_8EMXM0Y
    See description to jump to backend portion

Required Software:
    - NodeJS 10.11.0 https://nodejs.org/en/
    - A text editor I recommend https://code.visualstudio.com/
    - MAMP https://www.mamp.info/en/
    - MySQL Workbench https://www.mysql.com/products/workbench/


Creating the local database: 
    Start a MySQL server using MAMP
    
    Open MySQL Workbench and connect to the MySQL server created
        default credentials should be:
            host: localhost
            password: root
            port: 3306

    In MySQL Workbench run the following sql files (in this order. Important!):
        - server/db/schema.sql
        - server/db/snacks.sql
        - server/db/more_snacks.sql
        - server/db/ingredients.sql

Running the local database
    Open MAMP
    Press start servers

Running the backend:
    Make sure that prequisite software (Required Software section) is currectly installed
        For example, node --version in a terminal should give the node version
        
    Make sure that the MySQL server is running (see above)
    Make sure that the server/config/dbConfig.js has the correct MySql information

    If first time running run:
        'npm install' (without quotes) in a terminal in the snackability-backend/ directory
    
    run:
        'npm run start' (without quotes) in a terminal in the snackability-backend/ directory

    The NodeJS server is running correctly if no errors are produced after 'listening on Port: 4000'






