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 |
Hi Andy,
On 13 Jun 2013, at 17:10, Andy Burnett <[hidden email]> 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 |
In reply to this post by Andy Burnett
<<<
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. >>> Thanks Sven, that's great! And, I am glad I asked, because I wouldn't have worked that out.
It seems to me that Zinc is becoming sufficiently powerful that it could do with a section in the collaboractive cookbook. Could someone on this list give me an account? I could start to capture bits and pieces.
cheers Andy |
On Jun 14, 2013, at 11:33 PM, Andy Burnett <[hidden email]> wrote:
have a look on git https://github.com/SquareBracketAssociates/PharoForTheEnterprise-english I started to convert all the zinc documentation that sven wrote. We can add a new chapter on Zinc Usage. We are working on a format that generates autoamtically PDF and html for the next books. Stef
|
In reply to this post by Andy Burnett
mariano?
Stef Could someone on this list give me an account? I could start to capture bits and pieces. |
Free forum by Nabble | Edit this page |