Code Monkey home page Code Monkey logo

chat's Introduction

Chat

React app with Apollo Server backend.

Table of Contents


Client Technologies

  • React
  • Apollo Client
  • React Bootstrap
  • Jest

Backend Technologies

  • Node.js
  • Apollo Server
  • GraphQL
  • Sequelize
  • Sequelize CLI
  • MySQL
  • JSON Web Token
  • Bcrypt

Scripts

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\"

Notes

  • 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

  • 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 data
  • sequelize db:seed:all: run all seeds
  • sequelize db:seed --seed 20210429191405-create-messages.js: run specific seed

Setting up a migration and migrate

  • sequelize model:generate --name Message --attributes content:string,uuid:uuid,from:string,to:string
  • sequelize db:migrate

Remove Tables

sequelize db:migrate:undo:all

TODO

  • Build copy from scratch
  • Use TypeScript
  • Use MongoDB instead of Sequelize

chat's People

Contributors

ronnevinkx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.