Projeto NodeJs com Mysql
yarn init -y
Gerenciador de Rotas yarn add express
yarn global add nodemon yarn add -D nodemon Comando para rodar nodemon "nomearquivo.js"
create database usuarios character set utf8mb4 collate utf8mb4_unicode_ci;
CREATE TABLE usuarios
.users
(
id
INT NOT NULL AUTO_INCREMENT,
name
VARCHAR(220) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' NOT NULL,
email
VARCHAR(220) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' NOT NULL,
PRIMARY KEY (id
)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
yarn add sequelize
yarn add mysql2