ssid thehatch success!files.meetup.com/14621542/sequlize.pdf · • migration • hooks • ... •...

16
WIFI ssid TheHatch pw success! Github http://tinyurl.com/hfpkv63 SEQUELIZE NodeJS ORM for SQL Databases Upcoming Meetings February 16 - RIOT Mike Ward March 15 - Webpack Miguel Castillo April 19 - Angular2 + TypeScript Bill Wagner

Upload: others

Post on 27-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

WIFI

ssid TheHatch

pw success!

Github

http://tinyurl.com/hfpkv63

SEQUELIZENodeJS ORM for SQL Databases

Upcoming MeetingsFebruary 16 - RIOT

Mike WardMarch 15 - Webpack

Miguel CastilloApril 19 - Angular2 + TypeScript

Bill Wagner

Page 2: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

About Me

• Own and Run BrightDigit

• iOS Development• iPad• iPhone• Apple Watch

• JS Development• AngularJS• NodeJS• HTML5

Page 3: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Overview

• Why?• What is the purpose of Sequelize?

• What?• What does it do?

• How?• How does it work?

• What’s Next?• What are other things you can do?

Page 4: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

elephant in the room

Page 5: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

how about normal databases?

Page 6: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

how it works

Page 7: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

–Sequelize Home Page

“a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid

transaction support, relations, read replication and more”

Page 8: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Sequelize - How?• Setup

• Models

• Relationships

• Validation and Error Handling

• Deployment

• Migration

Page 9: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Getting Started• NodeJS

• https://nodejs.org

• DB Browser for SQLite• http://sqlitebrowser.org

• Git• https://github.com

• Repo• https://github.com/leogdion/lansingjs-1601-sequelize.git

Page 10: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

SetupHello World with NPM

Page 11: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

ModelsHow to create and use models for the ORM

Page 12: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

RelationshipsHow to create and use relationships

Page 13: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Validation and Error HandlingHow to do validation and handle errors

Page 14: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Whats Next?• Deployment

• Migration

• Hooks

• Transactions

• Raw Queries

• Advanced Promises

Page 15: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Thank You!

Page 16: ssid TheHatch success!files.meetup.com/14621542/Sequlize.pdf · • Migration • Hooks • ... • JS Meetings • February 16 - RIOT - Mike Ward • March 15 - Webpack - Miguel

Upcoming Schedule

• JS Meetings• February 16 - RIOT - Mike Ward• March 15 - Webpack - Miguel

Castillo• April 19 - Angular2 + TypeScript -

Bill Wagner• Mobile Mondays - January 25 - Google

Jesse Flores