This project is intended as a demonstration of the GraphQL usefulness.
- ✓ Create Git repo
- ✓ Create docker
- ✓ Add mysql, node.js, express.js to docker
- ✓ Generate data for db
- Setup webpack for FE and ✓ BE
$ npx sequelize model:generate --name User --attributes firstName:string,lastName:string,email:string
$ npx sequelize db:migrate:undo
$ npx sequelize db:migrate:undo:all --to XXXXXXXXXXXXXX-create-posts.js
$ make up
$ make makeMigrate
$ make makeSeed
1
$ sequelize init
2 // create db
$ sequelize db:create // create db
3 // create model
$ sequelize model:generate --name User --attributes firstName:string,lastName:string,email:string
1 custom migrations to make model
sequelize generate --name [your name]
To make a new migration to update a scheme
sequelize migration:create --name add_delete_to_products
Update the new migration file then inside docker:
sequelize db:migrate
For the dockerized react app, I looked at: https://mherman.org/blog/dockerizing-a-react-app/