Can someone explain me why if my client browser page is open and I restart the server the first socket connection ignores everything beyond the callback of the connection itself. If I restart the server and then open the browser page of the client this doesn't happen.
can someone please explain this line in app.js (server) .. var io = require('socket.io')(serv,{ }); ..
Hello, I can't get the button to execute the happy message. Am I the only one?
NOT a great job done… Reason because you do not explain anything… Just copy paste and copy paste
simply doesn't work for me. even went and did the shitty thing and copy/pasted finalcode from the link in description. same errors, only more. lovely. got excited for nada
not working for me once i put in the html scripts i'm getting errors in "after argument list" and starts listing off files in internal/modules/cjs/loader that i haven't even touched…
I know how to make a free website now
Wow! Your way for explaining things is just too AWESOME!!
Thank you so much.
Greats..
TypeError: Cannto read property 'on' of undefined ? hmm
It sounds like you are saying 'suck it connection' when you say socket connection lol
After this tutorial I made chat application but was very disappointed with lag, I don't think it's problem in my code (I didn't try to do anything fancy). If websocket lags so much making realtime game is impossible…
Have you played runescape before by any chance? Your voice seems familiar
Damn i learn so fast watching than reading several tutorials… Subscribed!
SUCK IT EYE OH
Thank you so much for these tutorials. They are easy to follow and really helpful because I can't find any other tutorials anywhere that are what I want except this one. 😀
If it does't work make sure that you don't have "NoScript" Addon installed or at least activate the script for the page 🙂
5:21 that comma after msg:'hello' is a mistake right?
appy!
video2 : done
awesomeeeee
It's possible to use socket.io in google firebase? …or use a free alternative to localtunnel for hosting a nodejs app?
I have the input code on index and App.js correct, it runs smooth and both node command prompt and Google chrome localhost, buuut…. it never says socket connection when I use Google chrome on the localhost.. Why is that? however the Server started statement does pop up
can anyone help me?
YEAH! I DID IT!
ThankYOU!
i'ts time to learn javascript
Lol OSX shell on Windows did not like me refreshing the page with this >_<
cool idea, terrible execution, you are way to scatter brained
Thank you so much
+RainingChain "Uncaught ReferenceError: io is not defined"
Thank you so much. It such a delight to go through your well constructed tutorials. Helps allot.
A very useful tool for not restarting the server over and over again is the npm package "nodemon". It watches for file changes and if you save and reload the page the server restarts automatically.
How can i add external css and js? All files (with index.htm)l are in client so i refer only to file like <script src="/main.js"></script> and console return error 404(not found) :<
wr
In case anyone else has this problem if the client is not connecting to the server with socket.io, changing the script link to <script src="/socket.io/socket.io.js"></script> works.
you are the man, GREAT JOB.
Thanks man great tutorial, on point with nice examples and no unnecessary rambling, cant wait for next episode!
thanks
Can someone explain me why if my client browser page is open and I restart the server the first socket connection ignores everything beyond the callback of the connection itself. If I restart the server and then open the browser page of the client this doesn't happen.
can someone please explain this line in
app.js (server)
..
var io = require('socket.io')(serv,{ });
..
if you get an error with sockets that console.log('socket connection'); is not working, please type https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js in the index.html instead of the one in the video. 2019
i do no get socket connection in my log
only 2 differences i have is i have a dedicated log function
and instead if saying function i just used the arrow function method
function log(MESSAGE,ID='System',STATUS='OK'){
console.log(`[${ID}][${STATUS}]:${MESSAGE}`)
};
var io = require('socket.io')(serv,{});
io.sockets.on('connection',(socket)=>{
log('socket connection');
});
The moment you realize It was really his birthday and he was making this tutorial. Not all cap wear heroes. m/
Edit : Subscribed.
if someone is having coneection problem with socket, just change the index.html file to:
<script src="/socket.io/socket.io.js"></script>
<script>
const socket = io();
</script>
Hello World
suck it connection 😀
Hello, I can't get the button to execute the happy message. Am I the only one?
NOT a great job done… Reason because you do not explain anything… Just copy paste and copy paste
simply doesn't work for me. even went and did the shitty thing and copy/pasted finalcode from the link in description. same errors, only more.
lovely. got excited for nada
not working for me once i put in the html scripts
i'm getting errors in "after argument list" and starts listing off files in internal/modules/cjs/loader that i haven't even touched…
I know how to make a free website now
Wow! Your way for explaining things is just too AWESOME!!
Thank you so much.
Greats..
TypeError: Cannto read property 'on' of undefined ? hmm
It sounds like you are saying 'suck it connection' when you say socket connection lol
After this tutorial I made chat application but was very disappointed with lag, I don't think it's problem in my code (I didn't try to do anything fancy). If websocket lags so much making realtime game is impossible…
/root/server/node_modules/socket.io/node_modules/engine.io/node_modules/uws/uws.js:3
const http = require('http');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Server.init (/root/server/node_modules/socket.io/node_modules/engine.io/lib/server.js:115:16)
at new Server (/root/server/node_modules/socket.io/node_modules/engine.io/lib/server.js:65:8)
at Function.attach (/root/server/node_modules/socket.io/node_modules/engine.io/lib/engine.io.js:123:16)
at Server.initEngine (/root/server/node_modules/socket.io/lib/index.js:274:21)
When I'am launching the server
anybody having the issue now i used <script src="/socket.io/socket.io.js"></script> and it worked just fien
Thank you!!!!
great tutorial!
Is your background from Rwby? D:
Have you played runescape before by any chance? Your voice seems familiar
Damn i learn so fast watching than reading several tutorials… Subscribed!
SUCK IT EYE OH
Thank you so much for these tutorials. They are easy to follow and really helpful because I can't find any other tutorials anywhere that are what I want except this one. 😀
If it does't work make sure that you don't have "NoScript" Addon installed or at least activate the script for the page 🙂
5:21 that comma after msg:'hello' is a mistake right?
appy!
video2 : done
awesomeeeee
It's possible to use socket.io in google firebase?
…or use a free alternative to localtunnel for hosting a nodejs app?
I have the input code on index and App.js correct, it runs smooth and both node command prompt and Google chrome localhost, buuut…. it never says socket connection when I use Google chrome on the localhost.. Why is that? however the Server started statement does pop up
can anyone help me?
YEAH! I DID IT!
ThankYOU!
i'ts time to learn javascript
Lol OSX shell on Windows did not like me refreshing the page with this >_<
cool idea, terrible execution, you are way to scatter brained
Thank you so much
+RainingChain "Uncaught ReferenceError: io is not defined"
Thank you so much. It such a delight to go through your well constructed tutorials. Helps allot.
A very useful tool for not restarting the server over and over again is the npm package "nodemon".
It watches for file changes and if you save and reload the page the server restarts automatically.
How can i add external css and js? All files (with index.htm)l are in client so i refer only to file like <script src="/main.js"></script> and console return error 404(not found) :<
wr
In case anyone else has this problem if the client is not connecting to the server with socket.io, changing the script link to <script src="/socket.io/socket.io.js"></script>
works.
you are the man, GREAT JOB.
Thanks man great tutorial, on point with nice examples and no unnecessary rambling, cant wait for next episode!