Hacker News new | ask | show | jobs
by mnemonik 5786 days ago
Regarding using NodeJS with ParenScript: it is really easy.

I am using Node on the backend of http://tryparenscript.com/ simply because it was easier to get up and running than Hunchentoot. Source code is on GitHub, if you want to check it out: http://github.com/fitzgen/tryparenscript.com

Here is the "Hello, WOrld!" example from the NodeJS homepage in ParenScript:

    (defvar *http* (require "http"))
    (chain *http*
           (create-server (lambda (req res)
                            ((@ res write-head) 200
                                                (create "Content-Type"
                                                        "text/plain"))
                            ((@ res end) "Hello, World!\n")))
           (listen 8124 "127.0.0.1"))
    ((@ console log) "Server running at http://127.0.0.1:8124/")