Skip to content

following tutorial on youtube to create a Chat app using soket.io and with authentication

Notifications You must be signed in to change notification settings

SwayamRana808/Chat-APP-yt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

initializing npm init -y in root so both frontend and backend can be deployed together. MONGO_DB_URI=mongodb+srv://swayamrana808: @cluster0.cgt4y5x.mongodb.net/<DATABASENAME (you can name any or the present one)>?retryWrites=true&w=majority&appName=Cluster0

to generate JWT TOKEN random secret key put command "<openssl rand -base64 32>" in git bash

we use proxy in client side as we will deploy app in same domain so only need in development phase

<export default defineConfig({ plugins: [react()], server:{ port:3000, proxy:{
"/api":{ target:"http://localhost:8000" } } } })>

deploying backend and frontend---

app.use(express.static(path.join(__dirname, "/frontend/dist")));

app.get("*", (req, res) => { res.sendFile(path.join(__dirname, "frontend", "dist", "index.html")); });

"start": "nodemon backend/server.js", "build":"npm install && npm install --prefix frontend && npm run build --prefix frontend"

in root that contains both frontend and backend

About

following tutorial on youtube to create a Chat app using soket.io and with authentication

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published