It took me reading the socket.io doc to find out I had to place this part inside the connection log part : So I changed socket with io, cause that's a variable. }) gives me an error asking me what is socket. Hey, just wanted to say I got stuck on that line : "app.use(express.static(public path)) " The HTML you linked from another github uses bootstrap which make the custom cursor not working on buttons. You should put a link to a github or zip containing the final structure of the project. The link to a demo at the end does not work anymore. You don't explain how to use the Home button even if you make a gif with it working. Some variables are weirdly written: "start button" instead of "startButton" and "public path" instead of "publicPath". Let startButton = document.getElementById("startButton") You don't define the startButton variable.You should put a link to a github or zip containing the base structure of the empty project so we don't have to manually create it by hand.I followed it but encountered some errors and things not written in the article. The article is a good idea but it is incomplete, there is some mistakes and few things that could be improved imo. Open a terminal in the directory and type Now we need to build the fundamentals of our application. Open VS Code in the folder and create the following structure: Create a new folder and name it The internet button. Okay, we will start by setting up the environment. Now you know what we are going to build as well as with what.Īs I am using Windows, I will be using Windows terms but if you're using another OS I am sure you will manage. Checking this link could also help you understand how it works. I suggest you take a look at their official website. So basically it's a library that allows us to create realtime applications. It has two parts: a client-side library that runs in the browser, and a server-side library for Node.js" It enables realtime, bi-directional communication between web clients and servers. We are also going to make the movement real-time so other people see if there is somebody else clicking it.Īs stated by the developers themselves: " Socket.IO is a JavaScript library for realtime web applications. We are going to create a button which when clicked, moves to a random location within the document. We are going to build a version of ChrisOnCode's 'Crazy Buttons' lesson. If you read my other post you already know what we are going to build.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |