React-based chat project for Vashta.
- Navigate to
backend/
and install modules:npm install
(ornpm install --force
for fresh installation) - Navigate to
frontend/chat-client/
and install modules:npm install
(ornpm install --force
for fresh installation) - Install nodemon module:
npm i -g nodemon
- Install PostgreSQL
- Windows:
- Install 9.6: https://www.postgresql.org/download/windows/
- Set root postgres user password to 1248 in setup (or set new pass in models/index.js)
- Ubuntu:
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
- Login as postgres user:
sudo -i -u postgres
- Connect to postgres:
psql -U postgres
- Set the password to 1248:
\password
- Exit database:
\q
- Switch back to previous user:
exit
- Windows:
- Add "psql" to Windows PATH
- Windows:
- Add C:\Program Files\PostgreSQL\9.6\bin to PATH
- Add C:\Program Files\PostgreSQL\9.6\lib to PATH
- Restart terminal(s)
- Windows:
- Connect to postgres:
psql -U postgres
- Create chat database:
create database chat;
- Exit database:
\q
- Install redis
- Start the redis websocket server:
redis-server
- Using another terminal if necessary, navigate into
backend/
- Compile the code with babel:
npm run build
- Start the backend nodemon server:
npm run serve
- Using another terminal if necessary, navigate into
frontend/chat-client/
- Start the frontend nodemon server:
npm start
psql -U postgres
: Connect to postgres\c chat
: Connect tochat
database\d
: List tables\d table_name
: Describe tabletable_name
\q
: Quit postgres
- ESLint
- No setup needed (.eslintrc.js already exists in
frontend/chat-client/
andbackend/
) - Necessary NPM modules will have been installed upon
npm install
oryarn install
in bothfrontend/chat-client/
andbackend/
- No setup needed (.eslintrc.js already exists in
- Prettier
- Add the following to your VSCode User Settings:
"prettier.singleQuote": true, "prettier.tabWidth": 4, "prettier.trailingComma": "es5", "prettier.eslintIntegration": true, "editor.formatOnSave": true, "prettier.printWidth": 140, "prettier.proseWrap": "preserve"
- Add the following to your VSCode User Settings:
- Node (Includes NPM)
- Yarn
- Chat (Vashta Server) + Chat (Local)
- GraphQL Testing (Vashta Server) + GraphQL Testing (Local)
- Apollo GraphQL Docs + Apollo GraphQL Docs (2.0 Migration)
- Sequelize Docs
- MobX Docs + MobX React Docs
- React Tutorial
- React Component Lifecycle Docs
- React Router Docs
- React Semantic UI Docs
- React Styled Components Docs
- Lodash