From: Joao Pedrosa Date: 2005-03-07T11:56:26+09:00 Subject: Re: WEBrick for a local application? Hi, On Sun, 6 Mar 2005 23:47:49 -0300, Joao Pedrosa wrote: > Hi, > > On Mon, 7 Mar 2005 11:41:05 +0900, Jeremy Bear wrote: > > Hello! > > > > I'm considering writing a dream journaling program for a small group > > of friends, and we're on different platforms. I'm on Linux, one is on > > FreeBSD, and others are on WindowsXP. Basically, I wanted to do > > something that would yield a nice cross-platform GUI. I've looked at > > using Tk, but I know that on the Linux/BSD platforms, it's rather > > ugly. I thought about making a Web based gui for the program, since I > > could use CSS and such to really make the interface look nice. > > > > I've looked at the WEBrick docs and samples, and, it looks like it > > could yield a decent solution. I've played around with it a little, > > and I realized that starting it up at all makes an open port to the > > outside world if you're online. That isn't exactly what I wanted to > > do. > > > > 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? I think that it could make a nice > > application base, but I don't want to compromise one's security while > > using it. > > > > I really wanted to keep downloads for these people to be kept to a > > minimum, so I didn't really want to make them download a bunch of > > extra GUI libraries. I also wanted something that would run fairly > > quick, and would be easy to use. (for some reason I have had a hard > > time grasping Fox, although Tk was easy enough) > > > > Am I barking up the wrong tree with this? > > 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) I could have asked, do you know Wee already? It's very capable in delivering Web-Apps. After a day or so you will have your solution partly done already. See: http://rubyforge.org/projects/wee/ WEBrick is its main backend so far. Cheers, Joao