Skip to content

Commit

Permalink
Add a simple example that runs on both node and rednode.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jun 7, 2010
1 parent fd8e4d0 commit fe8796a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/rednode
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')

require 'rednode'
Rednode::Context.new.run(ARGV[0])
5 changes: 5 additions & 0 deletions examples/basic/queerquine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// print myself *almost* like a quine
var sys = require('sys'),
fs = require('fs');

sys.puts(fs.readFileSync(__filename));

0 comments on commit fe8796a

Please sign in to comment.