Homework 15 - Sequelize-Da-Burger!
Sequelize-Da-Burger is a Node.js / Express / MySQL app using Sequelize ORM that allows the user to add a new burger of their choice and then devour it, moving it from the To Eat table to the Devoured table.
- Sequelize ORM
- Heroku / ClearDB Addon
- Replaced MySQL model with Sequelize ORM
- Updated controllers to fit new models
- Created User model and associated with Burger
- Added model validations
- Ordered results alphabetically
- Added delete button on devoured burgers (also deletes associated user)
- Access MySQL shell from the Terminal when running via MAMP
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
- Create the models and migrations
sequelize model:create --name Burger --attributes "burger_name:string, devoured:boolean" sequelize model:create --name User --attributes "name:string, devoured_count:integer"
- Migrate the database to Heroku (should work if ports are blocked)
heroku run:detached node_modules/.bin/sequelize --env production db:migrate