Hi Andy,
On 13 Jun 2013, at 17:10, Andy Burnett <[email protected]> wrote:
> I needed to serve some (amber) files from a local host - it was just a quick
> hack. I fired up the 2.0 one click image on my mac, and looked at the
> instructions for running the server. I can see how it would work if I
> installed it on Ubuntu, but I can't work out where my website's root folder
> would be on the mac. i tried the various folders inside the package, but
> none worked.
>
> Which brings me to the basic question, how do I configure the path for a
> ZnServer - i am sure it is very simple, but I couldn't work it out.
>
> Cheers
> Andy
This should work:
(ZnServer defaultOn: 1701)
logToTranscript;
delegate: ((ZnStaticFileServerDelegate new)
prefixFromString:
'apple/macosx';
directory:
'/Library/WebServer/Documents' asFileReference;
yourself);
start.
ZnClient new get: 'http://localhost:1701/apple/macosx/'.
If there is no index.html in the directory, you'll need to refer to an actual
file.
HTH,
Sven
--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org