Wednesday, August 20th, 2008

Running server side processes via JavaScript with Jaxer

Category: Aptana, JavaScript, Server

<>p>

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
< view plain text >
  1. <script runat="server-proxy">
  2. function runUptime() {
  3.       // run the uptime and return the output from STDOUT
  4.       return Jaxer.Process.exec("/usr/bin/uptime");
  5. }
  6. </script>

You can see the application running live.

Related Content:

Posted by Dion Almaer at 10:45 am
1 Comment

+++--
3.9 rating from 21 votes

1 Comment »

Comments feed TrackBack URI

Here’s the full article from Tom including the source to the app:
http://www.codegobbler.com/how-execute-server-side-processes-jaxerprocess

Comment by khakman2 — August 20, 2008

Leave a comment

You must be logged in to post a comment.