Basic chat platform with NodeJS, React & GraphQL
- In a new project, install the apollo-server and graphql dependencies using:
npm i apollo-server graphql
- Sequelize ORM
$ npm i --save sequelize
$ npm i sequelize-cli -g
$ npm i --save mysql2
$ sequelize model:generate --name User --attributes username:string,email:string
$ sequelize model:generate --name Message --attributes content:string,uuid:uuid,from:string,to:string
$sequelize model:generate --name Reaction --attributes content:string,uuid:uuid
$ sequelize db:migrate
$ sequelize seed:generate --name create-users
$ sequelize seed:generate --name create-messages
$ sequelize db:migrate:undo:all
$ sequelize db:migrate
$ sequelize db:seed:all
npm i && cd client/ && npm i
npm run dev
cd client/
npm run start