dougie smith <dsv...@gmail.com> writes:
> i have installed nodejs
> not sure what to do next
>
> do i need an 'ob.javascript file?
>
> can't seem to find any docs.

AFAIK, the only documentation is in the file ob-js.el.  Back in 2011,
Eric Schulte welcomed patches to ob-js.el to support sessions with
node.  I don't think there has been any subsequent work on this front.

You'll need something like this in .emacs:

(org-babel-do-load-languages
 'org-babel-load-languages
 '((js . t)))

If you evaluate the following source code block, you can look at
localhost:8888 and see Hello World.  But, emacs is fully engaged until
you press Ctrl-G.

#+begin_src js :tangle hello.js
var http = require("http");

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
}).listen(8888);
#+end_src

hth,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

Reply via email to