]> git.cworth.org Git - nodemuch/commitdiff
Rename example.js to nodemuch.js
authorCarl Worth <cworth@cworth.org>
Sun, 5 Dec 2010 11:30:29 +0000 (03:30 -0800)
committerCarl Worth <cworth@cworth.org>
Sun, 5 Dec 2010 11:30:29 +0000 (03:30 -0800)
We decided on a project name so we can use a real filename now.

example.js [deleted file]
nodemuch.js [new file with mode: 0644]

diff --git a/example.js b/example.js
deleted file mode 100644 (file)
index fb57c91..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-var http = require( "http" ),
-    parse = require( "url" ).parse,
-    exec = require( "child_process" ).exec;
-
-http.createServer( function(req, res) {
-    var url = parse( req.url ),
-        action = url.pathname.split( "/" ).splice(-1)[0];
-    if ( action  === "search" ) {
-        exec( "notmuch search " + url.query, function( error, stdout, stderr ) {
-            res.writeHead( 200, { "Content-Type": "text/plain" } );
-            res.end( stdout );   
-        });
-    } else if ( action === "show" ) {
-        exec( "notmuch show " + url.query, function( error, stdout, stderr ) {
-            res.writeHead( 200, { "Content-Type": "text/plain" } );
-            res.end( stdout );   
-        });
-    } else {
-        res.writeHead( 404 );
-       res.end("404");
-    }
-}).listen( 8124, "127.0.0.1" );
-
-console.log( "Server running at http://127.0.0.1:8124/" );
diff --git a/nodemuch.js b/nodemuch.js
new file mode 100644 (file)
index 0000000..fb57c91
--- /dev/null
@@ -0,0 +1,24 @@
+var http = require( "http" ),
+    parse = require( "url" ).parse,
+    exec = require( "child_process" ).exec;
+
+http.createServer( function(req, res) {
+    var url = parse( req.url ),
+        action = url.pathname.split( "/" ).splice(-1)[0];
+    if ( action  === "search" ) {
+        exec( "notmuch search " + url.query, function( error, stdout, stderr ) {
+            res.writeHead( 200, { "Content-Type": "text/plain" } );
+            res.end( stdout );   
+        });
+    } else if ( action === "show" ) {
+        exec( "notmuch show " + url.query, function( error, stdout, stderr ) {
+            res.writeHead( 200, { "Content-Type": "text/plain" } );
+            res.end( stdout );   
+        });
+    } else {
+        res.writeHead( 404 );
+       res.end("404");
+    }
+}).listen( 8124, "127.0.0.1" );
+
+console.log( "Server running at http://127.0.0.1:8124/" );