Skip to content

mealthebear/hrla31-mysql-sequelize-review

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Database Review using Sequelize

Server and mySQL shell startup

npm install
start mysql server + mysql shell

Exercise 1

  • Create your database folder.
  • Create an index file inside your database folder.
  • In your shell, create a mysql database.
  • Set up Sequelize to establish a connection to the mysql database, and export the connection.

Exercise 2

  • Create a file to describe our Sequelize model schema.
  • Export your schema.

Exercise 3

  • Connect your database to your controller.
  • Build out your controller functionality in the server controller file.
  • Use an external tool such as Postman to test your database with GET, POST, PUT and DELETE requests.
  • Check that the database is being updated with each request in your mysql shell.

Exercise 4

  • Create a file with some data that fits your schema, and write a function to seed that data into the database.
  • Add this functionality as a setup script to your package.json and run it.

About

Matthew's awesome mysql-sequelize review

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%