Im a complete novice when it comes to coding but i used a youtube tutorial to make a multiplayer browser game using socket io and javascript. Everything works fine on localhost but i wanted to play over the internet so i got a domain and i am using a free hosting site.
I dont know how or where to move the files from my computer to the website and i cant find any tutorial on it either. Ive uploaded my html file and client side js file to the file manager on the free hosting site and that seems to work but where do i upload the server side js file? In the same place?
Also since i am not using localhost anymore i dont know what to put inside of :
var socket = io.connect(***HERE***);
on the client side and
var express = require('express');
var socket = require('socket.io');
var app = express();
var server = app.listen(***HERE***, function(){
console.log('listening for requests');
});
on the server side