Skip to content

tiffchannn/mySQLReview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Review

A quick review of connecting a MySQL database to our Express server

Usage

npm install

Scripts

npm run connect *** verify db connection
npm run start

This repo is recommended to be used with MySQL 5.7.

Documentation

  • MySQL: MySQL Github documentation

Step 1

  • Create database foodDB within MySQL
  • Establish connection to database in database/index.js

Step 2

  • Create a schema in database/schema.sql to describe our food table
  • Run schema file in terminal

Step 3

  • Create a seeding function in database/seed.js to populate table with at least 5 records
  • Run seed file in terminal

Step 4

  • Create dbHelper functions in database/dbHelpers.js
  • Create controller functions in server/controllers.js
  • Create routes in server/router.js
  • Use dbHelper functions within your controller functions

Step 5

  • Test for working functionality via Postman





Express

Express is a routing and middleware web framework that has minimal functionality of its own: An Express application is essentially a series of middleware function calls.

MIDDLEWARE UTILIZED:

HELPFUL DOCS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%