- Make sure Git and NodeJS is installed
- Yarn is faster than Npm. So use Yarn.
- Create .env file in both public and server folder.
- server/.env
PORT=5000
MONGO_URL=xxxxxxxxxxxxxx
MESSAGE_ALGORITHM="aes-256-ctr"
MESSAGE_SECRET_KEY="xxxxxxxxxxxxxxxxxx"
CLIENT_URL="http://localhost:3000"
- public/.env
REACT_APP_CHAT_APP_USER="xxxxxxxxxxxxxxxxxxxxxx"
REACT_APP_MULTIAVATAR_API_KEY="xxxxxxxxxxxxxxxxx"
REACT_APP_SERVER_URI="http://localhost:5000"
- In most cases localhost is set to port 3000 and 5000 in client and server side respectively. But if there is any issue in connection you can change these values.
- Make sure Mango Db and Mongo Db Compass is installed on your local system. If it's not, you can follow this guide.
- Now copy your mongo db url as shown below:
NOTE: Both MESSAGE_SECRET_KEY
and REACT_APP_CHAT_APP_USER
are just different random strings. You can generate them using a password generator. Make sure their length is of decent amount like 16 or 32.
- To setup Avatar, Create an account in Multiavatar API
- On app dashboard, copy your key as shown below and paste them in .env file in public folder.
NOTE: You can use Multiavatar API without account but API requests are limited to 10/min that's why, I didn't recommend doing it in that way. Make sure you don't share them publicly.
-
Clone this repository to your local computer.
-
Open terminal in root directory and
cd server
-
Type and Run
yarn install
-
Run
yarn start
to start back end server -
Now, check console. If it says, Server is running! and Database connection successfull. Then it means that everything is working fine!
-
Now, nodejs server is configured and started. Next, we need to setup Client side server.
-
Open a new Terminal and run
yarn install
. Make sure you are inpublic
folder. -
Once packages are installed, type and run
yarn start
-
Now client side server will be started and you can start using this app 👍
This app is currently not mobile responsive. Only responsive upto Tablet devices. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.