React app with Apollo Server backend.
- React
- Apollo Client
- React Bootstrap
- Jest
- Node.js
- Apollo Server
- GraphQL
- Sequelize
- Sequelize CLI
- MySQL
- JSON Web Token
- Bcrypt
Description | Command | Value |
---|---|---|
Start server | npm run start |
node server.js |
Start server with Nodemon | npm run server |
nodemon server.js |
Start client | npm run client |
npm start --prefix client |
Start both client and server | npm run dev |
concurrently \"npm run server\" \"npm run client\" |
-
Based on this Classed tutorial.
-
VSCode extension for GraphQL syntax highlighting:
GraphQL for VSCode
-
Decided to not use
classnames
dependency but vanilla JS instead -
Decided to extend jwt token with not only with username, but with object that contains id and username
sequelize --help
to list all sequelize CLI commands (run in dir where sequelize is locally installed)sequelize init
sequelize seed:generate --name create-users
: like a migration, but for datasequelize db:seed:all
: run all seedssequelize db:seed --seed 20210429191405-create-messages.js
: run specific seed
sequelize model:generate --name Message --attributes content:string,uuid:uuid,from:string,to:string
sequelize db:migrate
sequelize db:migrate:undo:all
- Build copy from scratch
- Use TypeScript
- Use MongoDB instead of Sequelize