Ajax Blog


Running server side processes via JavaScript with Jaxer

Posted in Ajax News by Dion Almaer on the August 20th, 2008

Tom Kirkpatrick has written about a new API in Jaxer, Jaxer.Process, that allows you to call out to the host operating system. His example has a call out to get the uptime on the machine:

JAVASCRIPT:
  1.  
  2. <script runat="server-proxy">
  3. function runUptime() {
  4.       // run the uptime and return the output from STDOUT
  5.       return Jaxer.Process.exec("/usr/bin/uptime");
  6. }
  7. </script>
  8.  

You can see the application running live.

Source: Ajaxian » Front Page
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/370072197/running-server-side-processes-via-javascript-with-jaxer

Comments are closed.