For similar purpose I start a server with something like:
Code Select
newlisp.exe -c -d 4780 -w ..MyProjectsToWeb
(on Windows OS)
In ..MyProjectsToWeb I've put index.cgi which might look like (minimalistic):
Code Select
#!/usr/bin/newlisp
(print "Content-type: text/htmlrnrn")
(module "cgi.lsp")
(define (my-hubert) (println "<h3>Hello World!</h3>"))
(apply (read-expr (CGI:params 0 0)))
(exit)
Then I open in a browser
:) Not the absolute elegance, but it works...
PS notes:
- I don't remember why I left -c parameter when starting the server. May be it's not important and -http will be fine too
- The first line of index.cgi is important for Linux. I use the same code on both Windows and Linux machines at home.
- In index.cgi you can use (load "path-to-some-newlisp-file") to load more functions and/or data, of course.
- I'm using this for a very simplistic implementation of Wiki combined with Markdown-like coding ... it's great fun to see it working with so small code :)
Good Luck and please, share how Your experiments go.
PPS. I'm sorry, I didn't pay enough attention to httpd-conf.lsp. It's obvious, that the command-event function could transform a nicer "outside" url like