I have limited experience with backend development and integrating different technologies. Recently, I built a basic live messaging application using node.js
and socket.io
. Interestingly, the app functions flawlessly when hosted on my local machine using http-server
, which runs on a local port through node.js. However, when I attempted to upload it to my host or GitHub pages for testing, the backend functionality failed to work properly. Although the frontend loads successfully after uploading all files via an FTP program, the backend remains unresponsive. Should I consider learning frameworks like Django or ASP.NET in order to resolve this issue on my hosting platform?
EDIT: Additionally, the first line in my server.js
file reads as
const io = require('socket.io')(3000)
, while my script.js
contains the line const socket = io('http://localhost:3000')
, where 3000 and localhost:3000 refer to the localhost on my personal machine. What adjustments should be made to these values when deploying the application elsewhere?