JerryChat is a Full Stack Chatting App. Uses Socket.io for real time communication and stores user details(sensetive) in encrypted format in Mongo DB Database.
Client: React JS.
Server: Node JS, Express JS.
Database: Mongo DB.
https://jerrychat.onrender.com/
Clone the project
git clone https://github.com/NitinVadadoriyaa/JerryChat
Go to the project directory
cd ChatApp
Install dependencies
npm install
cd frontend/
npm install
Start the server
npm run start
Start the client
//open new terminal
cd frontend
npm run start
To run this project, you will need to add the following environment variables to your .env file
PORT=5000
MONGO_URI = 'Your mongodb api'
JWT_SECRET = "your secret name"
NODE_ENV = production
REACT_APP_SECRET_KEY = 'your number(atleast 10 digit)'
``Before runing app make some change.
-
backend / server.js REPLACE : origin: "https://jerrychat.onrender.com/" To origin: "http://localhost:3000"
-
backend / server.js REMOVE THIS CODE
const __dirname1 = path.resolve();
if (process.env.NODE_ENV === "production") { app.use(express.static(path.join(__dirname1, "/frontend/build")));
app.get("*", (req, res) => res.sendFile(path.resolve(__dirname1, "frontend", "build", "index.html")) ); } else { app.get("/", (req, res) => { res.send("API is running.."); }); }
- /frontend/src/components/SingleChat.js REPLACE: ENDPOINT = "https://jerrychat.onrender.com/" TO ENDPOINT = "http://localhost:5000"
NitinVadadoriya