Re: A good way to write an api server

2019-03-16 Thread rick
Thank you, Kashyap! On Sat, 16 Mar 2019 00:34 -04:00, C K Kashyap wrote: > Okay, I have it running finally! > > I have the docker image here - ckkashyap/tools:picolisp-hack- it has IPV4 > based httpgate installed inside :) > The IPV4 version of httpGate is here - >

Re: A good way to write an api server

2019-03-15 Thread C K Kashyap
Okay, I have it running finally! I have the docker image here - ckkashyap/tools:picolisp-hack- it has IPV4 based httpgate installed inside :) The IPV4 version of httpGate is here - https://github.com/ckkashyap/picoLisp/blob/contrib/src/httpGate.c Regards, Kashayap On Fri, Mar 15, 2019 at 7:38

Re: A good way to write an api server

2019-03-15 Thread C K Kashyap
Looks like in my excitement I had completely dropped the name lookup logic while introducing the IPv4 logic from the past :) I'll fix it. On Fri, Mar 15, 2019 at 12:23 AM Alexander Burger wrote: > Hi Kashyap, > > > So I was able to successfully run httpGate and the server - using > httpGate > >

Re: A good way to write an api server

2019-03-15 Thread Alexander Burger
Hi Kashyap, > So I was able to successfully run httpGate and the server - using httpGate > 3000 8080! > However, I am having some trouble getting it to run using names - > > My names entry looks like this - > > dbapp 8080 root /root /tmp pil dbapp.l -main -go -wait This line looks good. Just

Re: A good way to write an api server

2019-03-15 Thread C K Kashyap
So I was able to successfully run httpGate and the server - using httpGate 3000 8080! However, I am having some trouble getting it to run using names - My names entry looks like this - dbapp 8080 root /root /tmp pil dbapp.l -main -go -wait Strace reveals that httpGate does not seem to get

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
As expected, it was rather trivial to copy over gatePort and gateConnect from PicoLisp 3.0.7 and I have httpGate working in docker!!! I have the code here - https://github.com/ckkashyap/picoLisp/blob/contrib/src/httpGate.c :) Regards, Kashyap On Thu, Mar 14, 2019 at 10:16 AM C K Kashyap wrote:

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
Looks like it. I just tested on docker on windows and that does not work either. Fortunately it works on a linux VM on Azure. Since getting it to run on docker would be a really nice to have - would it be too hard to have a IPv4 flavor of httpGate? Oh yes, IPv4 is quite alive and kicking - I

Re: A good way to write an api server

2019-03-14 Thread Alexander Burger
Hi Kashyap, > And things worked just fine when I tried on WSL :) .. so it must be the > ipv6 issue on docker. Yes, indeed! All PicoLisp networking functionalities require IPv6 ability. Strange that docker supports only IPv4 these days :( And also strange we find this out now - as I understand

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
And things worked just fine when I tried on WSL :) .. so it must be the ipv6 issue on docker. Regards, Kashyap On Thu, Mar 14, 2019 at 5:55 AM C K Kashyap wrote: > The dbapp is essentially from here - https://picolisp.com/wiki/?mindbgui > and it seems to run fine. > > I tried strace on httpGate

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
The dbapp is essentially from here - https://picolisp.com/wiki/?mindbgui and it seems to run fine. I tried strace on httpGate and got this - looks like httpGate needs IPv6 and docker supports IPv6 only for Linux hosts and I am running my stuff on a

Re: A good way to write an api server

2019-03-14 Thread Alexander Burger
Hi Kashyap, > I cant seem to get httpGate to run correctly. I tried running it as follows > First run the app on port 8080 - > /pil dbapp.l -main -go -wait & > ... > /bin/httpGate 3000 8080 > ... > root@6b36fb429264:~/picoLisp# telnet localhost 3000 > ... > GET / HTTP/1.1 This seems correct. It

Re: A good way to write an api server

2019-03-13 Thread C K Kashyap
Hi, I cant seem to get httpGate to run correctly. I tried running it as follows - First run the app on port 8080 - /pil dbapp.l -main -go -wait & Then run httpGate like this - /bin/httpGate 3000 8080 When I try to connect to port 3000 - I get "empty response" root@6b36fb429264:~/picoLisp#

Re: A good way to write an api server

2019-03-12 Thread C K Kashyap
Cool...thanks Alex. Regards, Kashyap On Tue, Mar 12, 2019 at 7:42 AM Alexander Burger wrote: > Hi Kashyap, > > > 1. Is there a way I could restrict the server from navigating to a > > different port? I run the app on docker and it requires explicit mapping > of > > the ports in advance :( > >

Re: A good way to write an api server

2019-03-12 Thread Alexander Burger
Hi Kashyap, > 1. Is there a way I could restrict the server from navigating to a > different port? I run the app on docker and it requires explicit mapping of > the ports in advance :( Yes. The full recommended setup uses bin/httpGate as a proxy and dispatcher. Towards the outside world only

Re: A good way to write an api server

2019-03-12 Thread C K Kashyap
Thanks Alex, I tried the demo app (pretty cool) and I have a couple questions - 1. Is there a way I could restrict the server from navigating to a different port? I run the app on docker and it requires explicit mapping of the ports in advance :( 2. How do I know the "number" of the field to

Re: A good way to write an api server

2019-03-12 Thread Alexander Burger
Hi Kashyap, > The goal is to write a server that I can drive with curl on the > command line. Prrhaps this helps too: https://picolisp.com/wiki/?guiscripting - Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: A good way to write an api server

2019-03-11 Thread C K Kashyap
Thanks Beneroth, Web.l seems like what I am looking for. I am pretty familiar with HTTP actually and a regular user of telnet/openssl :) Regards, Kashyap On Mon, Mar 11, 2019 at 7:49 PM wrote: > Hi Kashyap > > Try out web.l: https://bitbucket.org/iromero91/web.l/wiki/Home > (also linked at the

Re: A good way to write an api server

2019-03-11 Thread andreas
Hi Kashyap Try out web.l: https://bitbucket.org/iromero91/web.l/wiki/Home (also linked at the bottom at https://picolisp.com/wiki/?Documentation) It's relatively straight-forward, good to start, for simple use cases. URL's are matched using (match) (see picolisp reference). The standard GUI

A good way to write an api server

2019-03-11 Thread C K Kashyap
Hi, What's a good way to bring up an API server in PicoLisp? The example give here - https://rosettacode.org/wiki/Hello_world/Web_server#PicoLisp does not seem to provide an opportunity to handle GET/POST parameters. And I do not want to use the GUI framework. The example here is too low level