Using Zinc this becomes something like:

ZnServer startDefaultOn: 1701.

ZnServer default delegate: (
  (ZnStaticFileServerDelegate new) 
     prefixFromString: 'apple/macosx'; 
     directory: '/Library/WebServer/Documents' asFileReference; 
     yourself).

http://localhost:1701/apple/macoxs/

> On 26 Mar 2015, at 06:00, Hernán Morales Durand <[email protected]> 
> wrote:
> 
> Hi Silvia,
> 
> You don't need Seaside or Iliad, to serve static content. In the 
> Configuration Browser (I guess you are using Pharo 3 at least) you can select 
> KomHttpServer, Install, and then evaluate the following expression:
> 
>     | ma |
>     ma := ModuleAssembly core.
>     ma documentRoot: FileSystem disk workingDirectory fullName.
>     ma directoryIndex: 'index.html index.htm'.
>     ma serveFiles.
>     (HttpService startOn: 8080 named: 'Example') plug: ma rootModule
> 
> Finally browse to http://localhost:8080
> 
> Cheers,
> 
> Hernán
> 
> 
> 
> 2015-03-25 20:40 GMT-03:00 Silvia Ruiz Diaz <[email protected]>:
> Hi all!
> 
> I'm new to Pharo and I'm trying to generate links to be able to serve some 
> files. This is what I have so far.
> 
> 
> html anchor url:'http://localhost:8080/myApp/myFile'; with: 'Link'
> 
> 
> When clicking on any of the generated links I'm getting redirected to the 
> application homepage, so I'm wondering if is there any additional setup I 
> have to take care of in order to grant access to these files.
> 
> My OS is Windows 64.
> 
> Thanks in advance!
> 
> Regards!
> 


Reply via email to