Unable to send welcome messages to the user due to slow loading socket.io or jquery
0
I am trying to send welcome messages to the use upon joining the chat room.But due to slow loading socket/jquery the welcome messages are never shown when the user is redirected from the login page to chat page. When the user is already present at a chat room page(logged in) and then reloads the page after restarting the server once..the welcome messages are shown. server.js---- const path=require('path'); var express=require('express'); var http=require('http'); var socketIO=require('socket.io'); var moment=require('moment'); var port=process.env.PORT||3000; var app=express(); var server=http.createServer(app); const publicPath=path.join(__dirname,'../public'); app.use(express.static(publicPath)); var io=socketIO(server);//io is a server instance ...