From: Luke Graham Date: 2005-03-07T12:14:31+09:00 Subject: Re: WEBrick for a local application? On Mon, 7 Mar 2005 12:09:09 +0900, Jeremy Bear wrote: > > > My main question, I guess, is this: Is there any way that I can use > > > WEBrick in a local setting only that will not open up a persons > > > computer to the outside world? > > > > WEBrick rocks. > > > > You can use :BindAddress => local_ip and it will be LAN accessible only. Like: > > > > :BindAddress => 192.168.0.100, :Port => 2000 > > > > See its code, as I use Wee and its a bit different, like: > > Wee::WEBrickAdaptor.register('/app' => app).start(:BindAddress => > > '192.168.0.100', :Port => 2000) > > Ah, okay. This seems simple enough. My question regarding this, > though, is: What if I don't know what they have their local IP set to? > Does it need to match their IP, or is there a more "generic" one I > can use, such as the 127.0.0.1 address that vruz mentioned, that will > work no matter what for the local host? 127.0.0.1 is the standard loopback address, it works on windows and unix, and most other places as well. -- spooq