Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add node v0.2.3 support

  • Loading branch information...
commit 10d75d5f5e5e4d6464e6cf1d9eab82ff35e1775c 1 parent 01f3e79
Tim Caswell authored May 05, 2011
2  indexer.js
@@ -3,7 +3,7 @@ var Fs = require('fs'),
3 3
     Url = require('url'),
4 4
     getMime = require('simple-mime')("application/octet-stream");
5 5
 
6  
-var ENOENT = require('constants').ENOENT;
  6
+var ENOENT = process.ENOENT || require('constants').ENOENT;
7 7
 
8 8
 module.exports = function setup(mount, root, showHidden) {
9 9
 
2  package.json
@@ -2,7 +2,7 @@
2 2
   "name": "creationix",
3 3
   "description": "Creationix is a meta package for my personal packages",
4 4
   "tags": ["stack", "creationix", "meta", "sandbox"],
5  
-  "version": "0.1.1",
  5
+  "version": "0.1.2",
6 6
   "author": "Tim Caswell <tim@creationix.com>",
7 7
   "repository": {
8 8
     "type": "git",
8  static.js
@@ -86,6 +86,14 @@ module.exports = function setup(mount, root, index) {
86 86
         res.writeHead(code, headers);
87 87
         return res.end();
88 88
       }
  89
+      if (process.ENOENT) {
  90
+        Fs.readFile(path, function (err, data) {
  91
+          if (err) { return next(err); }
  92
+          res.writeHead(code, headers);
  93
+          res.end(data);
  94
+        });
  95
+        return;
  96
+      }
89 97
       var stream = Fs.createReadStream(path, {start: start, end: end});
90 98
       stream.once('data', function (chunk) {
91 99
         res.writeHead(code, headers);

0 notes on commit 10d75d5

Please sign in to comment.
Something went wrong with that request. Please try again.