earthcomfy / lets-chat

Real-time chat app using Firebase, React, TailwindCSS, MongoDB, Node/Express, and Socket.io
240 stars 89 forks source link

Running the code #4

Open DillonMercz opened 1 year ago

DillonMercz commented 1 year ago

Could you provide the instructions to get this code running? I feel there is a lot of blanks and I can't figure out how to run it. Thank you.

DillonMercz commented 1 year ago

{ host: 'localhost:8080', connection: 'keep-alive', 'cache-control': 'max-age=0', 'sec-ch-ua': '"Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36', accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7', 'sec-fetch-site': 'none', 'sec-fetch-mode': 'navigate', 'sec-fetch-user': '?1', 'sec-fetch-dest': 'document', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.9' } /Downloads/chat/server/middlewares/VerifyToken.js:6 const token = req.headers.authorization.split(" ")[1]; ^

TypeError: Cannot read properties of undefined (reading 'split')

earthcomfy commented 1 year ago

Please checkout the Getting Started section of the README. thanks.

Vivek-C-Shah commented 1 year ago

i am also facing the same issue i used the errorhandler like this also if (!token) { return res.json({ message: "Access Denied" }); }

but now its showing me unable to login and unable to register on the frontend

Osasdeke commented 11 months ago

Interesting

FTS-Dev3 commented 2 months ago

just enale the authentication in your firebase console it will work