aspose file tools*
The moose likes MongoDB and the fly likes Run my chat on internet instead of localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » MongoDB
Reply locked New topic
Author

Run my chat on internet instead of localhost

David Edgar
Greenhorn

Joined: Jul 29, 2014
Posts: 3
Hello everyone,

I had worked for a couple of time on developing some stuff working correctly on my home PC or to enter the main subject, on localhost like the chat program using (node, j's + mongodb + socket. Io). So now, when I try to make it on the internet (I have a web hoster) to enable every client who reaches my website the possibility to write text in seeing the chat box and all clients whose are on the same page will see that too.

I'm a little bit new with this sort of architecture, so please try to explain me which part of my code need to be on the host and on my PC. And also, how can I deal with the changing of the IP's address.

On the localhost, the chat works great. I launch the server.js, I have a database where I store the messages and an html/css chat box.

I want it to work like the phpMyChat application (some think like this).

Thanks.

David
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Welcome to the Ranch.

Nothing would run on your local machine. You would install the web app and the DB on your hosting server, and everyone would point their browser at the URL of the chat page. The IP of the server doesn't change, so that wouldn't be a concern.


Ping & DNS - my free Android networking tools app
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Closing this thread; it is continued at http://www.coderanch.com/t/637406/mongo/databases/put-mongoDB-server-host.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Run my chat on internet instead of localhost