tic-tac-toe-socket-io | An implementation of realtime Tic Tac Toe game | Socket library
kandi X-RAY | tic-tac-toe-socket-io Summary
kandi X-RAY | tic-tac-toe-socket-io Summary
An implementation of realtime Tic Tac Toe game using Socket.IO
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handles tile click events .
tic-tac-toe-socket-io Key Features
tic-tac-toe-socket-io Examples and Code Snippets
Community Discussions
Trending Discussions on tic-tac-toe-socket-io
QUESTION
I'm following this tutorial to implement a tic tac toe game using socket.io: https://ayushgp.github.io/Tic-Tac-Toe-Socket-IO/ .
But I also want to use a login system.
When the user logs in, it successfully goes to this page (I converted html to pug), located on /views/game.pug
...ANSWER
Answered 2018-Apr-10 at 22:04Based on your console screen grab, there are at least two problems here:
Your server-side route (if you even have one) for
script(src='node_modules/jquery/dist/jquery.min.js')
is not working so jQuery never loads in the web page. Thus, no attempt to use jQuery works.Your socket.io server is not started or initialized properly on the server.
To be able to suggest fixes, we'd need to see the relevant server-side code and we'd need to know where all resources referenced in game.pug
are located in your server-side file system (full path). You are either missing route a definition for the jQuery file or there's an error in the route definition.
It does look like main2.js
is loading properly, though it immediately encounters an error because of the missing jQuery.
FYI, using script paths like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tic-tac-toe-socket-io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page