pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

using zinc to server local files

SD
stephane ducasse
Thu, May 29, 2025 2:30 PM

Hi

I would like to use Zinc to debug some files that I’m generating.

I do the following

(ZnServer defaultOn: 7071) start.

(ZnServer defaultOn: 7071) start.
ZnServer default delegate: (ZnStaticFileServerDelegate new
prefixFromString: '';
directory: '/Users/ducasse/Test2/Play/generated/' asFileReference;
yourself)

Now I get the server running (the famicon is changed)
but when I do

http://localhost/7071/index.html

I get not found or #, was sent to nil

I tried to debug the delegate but I could not find my mistake.

Stéphane Ducasse
http://stephane.ducasse.free.fr
06 30 93 66 73

"If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes

Hi I would like to use Zinc to debug some files that I’m generating. I do the following (ZnServer defaultOn: 7071) start. (ZnServer defaultOn: 7071) start. ZnServer default delegate: (ZnStaticFileServerDelegate new prefixFromString: ''; directory: '/Users/ducasse/Test2/Play/generated/' asFileReference; yourself) Now I get the server running (the famicon is changed) but when I do http://localhost/7071/index.html I get not found or #, was sent to nil I tried to debug the delegate but I could not find my mistake. Stéphane Ducasse http://stephane.ducasse.free.fr 06 30 93 66 73 "If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes
NH
Norbert Hartl
Thu, May 29, 2025 4:13 PM

Am 29.05.2025 um 16:31 schrieb stephane ducasse via Pharo-users pharo-users@lists.pharo.org:

Hi

I would like to use Zinc to debug some files that I’m generating.

I do the following

(ZnServer defaultOn: 7071) start.

(ZnServer defaultOn: 7071) start.
ZnServer default delegate: (ZnStaticFileServerDelegate new
prefixFromString: '';
directory: '/Users/ducasse/Test2/Play/generated/' asFileReference;
yourself)

Now I get the server running (the famicon is changed)
but when I do

http://localhost/7071/index.html

It needs to be a colon before 7071.

http://localhost:7071/index.html

and using 127.0.0.1 is more safe to use but not related to the actual problem.

Norbert

I get not found or #, was sent to nil

I tried to debug the delegate but I could not find my mistake.

Stéphane Ducasse
http://stephane.ducasse.free.fr
06 30 93 66 73

"If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes

> Am 29.05.2025 um 16:31 schrieb stephane ducasse via Pharo-users <pharo-users@lists.pharo.org>: > > Hi > > I would like to use Zinc to debug some files that I’m generating. > > I do the following > > (ZnServer defaultOn: 7071) start. > > (ZnServer defaultOn: 7071) start. > ZnServer default delegate: (ZnStaticFileServerDelegate new > prefixFromString: ''; > directory: '/Users/ducasse/Test2/Play/generated/' asFileReference; > yourself) > > > Now I get the server running (the famicon is changed) > but when I do > > http://localhost/7071/index.html It needs to be a colon before 7071. http://localhost:7071/index.html and using 127.0.0.1 is more safe to use but not related to the actual problem. Norbert > > I get not found or #, was sent to nil > > I tried to debug the delegate but I could not find my mistake. > > > Stéphane Ducasse > http://stephane.ducasse.free.fr > 06 30 93 66 73 > > "If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes > > > > >
PH
Philip Hunt
Thu, May 29, 2025 8:31 PM

Url:port number not slash

May 29, 2025 12:13:21 Norbert Hartl via Pharo-users pharo-users@lists.pharo.org:

Am 29.05.2025 um 16:31 schrieb stephane ducasse via Pharo-users pharo-users@lists.pharo.org:

 Hi 

I would like to use Zinc to debug some files that I’m generating.

I do the following 

(ZnServer defaultOn: 7071) start.

(ZnServer defaultOn: 7071) start.
ZnServer default delegate: (ZnStaticFileServerDelegate new
prefixFromString: '';
directory: '/Users/ducasse/Test2/Play/generated/' asFileReference;
yourself)

Now I get the server running (the famicon is changed)
but when I do 

http://localhost/7071/index.html

It needs to be a colon before 7071.

http://localhost:7071/index.html

and using 127.0.0.1 is more safe to use but not related to the actual problem.

Norbert

I get not found or #, was sent to nil

I tried to debug the delegate but I could not find my mistake.

Stéphane Ducasse
http://stephane.ducasse.free.fr
06 30 93 66 73

"If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes

Url:port number not slash ---------------------------------------- May 29, 2025 12:13:21 Norbert Hartl via Pharo-users <pharo-users@lists.pharo.org>: > > >> Am 29.05.2025 um 16:31 schrieb stephane ducasse via Pharo-users <pharo-users@lists.pharo.org>: >> >>  Hi  >> >> I would like to use Zinc to debug some files that I’m generating. >> >> I do the following  >> >> (ZnServer defaultOn: 7071) start. >> >> (ZnServer defaultOn: 7071) start. >> ZnServer default delegate: (ZnStaticFileServerDelegate new >> prefixFromString: ''; >> directory: '/Users/ducasse/Test2/Play/generated/' asFileReference; >> yourself) >> >> >> Now I get the server running (the famicon is changed) >> but when I do  >> >> http://localhost/7071/index.html > > It needs to be a colon before 7071. > > http://localhost:7071/index.html > > and using 127.0.0.1 is more safe to use but not related to the actual problem. > > Norbert >> >> I get not found or #, was sent to nil >> >> I tried to debug the delegate but I could not find my mistake. >> >> >> Stéphane Ducasse >> http://stephane.ducasse.free.fr >> 06 30 93 66 73 >> >> "If you knew today was your last day on earth, what would you do differently? ....ESPECIALLY if, by doing something different, today might not be your last day on earth.” Calvin & Hobbes >> >> >> >> >>