From: Eko Budi Setiyo Date: 2005-03-07T12:22:51+09:00 Subject: Re: WEBrick for a local application? Bill Guindon wrote: >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.01 is the IP for 'localhost' (ie: "this machine"), so it's a >safe bet that. >The only time I could see it being an issue is if they're already >running another server of some kind on the same port (unlikely). > > > Is Webrick can be use for single point of entry (every request served by index.rb). regards Eko