Last active
August 29, 2015 14:17
-
-
Save ryansobol/3f86ee63034e321c14d4 to your computer and use it in GitHub Desktop.
Revisions
-
ryansobol revised this gist
Mar 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ var url = require('url'); http.createServer(function(request, response) { var pathname = __dirname + url.parse(request.url).pathname; fs.exists(pathname, function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); -
ryansobol revised this gist
Mar 23, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,11 @@ http.createServer(function(request, response) { fs.exists(pathname,function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); }); } else { response.writeHead(404, { "Content-Type": "text/html" }); response.end("<h1>404 File Not Found</h1>"); } }); -
ryansobol revised this gist
Mar 23, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,11 @@ http.createServer(function(request, response) { fs.exists(pathname,function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); }); } else { response.writeHead(404, { "Content-Type": "text/html" }); response.end("<h1>404 File Not Found</h1>"); } }); -
ryansobol revised this gist
Mar 23, 2015 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,13 +7,13 @@ http.createServer(function(request, response) { var pathname = __dirname + url.parse(request.url).pathname; fs.exists(pathname,function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); }); } else { response.writeHead(404, { "Content-Type": "text/html" }); response.end("<h1>404 File Not Found</h1>"); } }); }).listen(8080); -
ryansobol revised this gist
Mar 23, 2015 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,16 +4,16 @@ var fs = require('fs'); var url = require('url'); http.createServer(function(request, response) { var pathname = __dirname + url.parse(request.url).pathname; fs.exists(pathname,function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); }); } else { response.writeHead(404, { "Content-Type": "text/html" }); response.end("<h1>404 File Not Found</h1>"); } }); }).listen(8080); -
ryansobol renamed this gist
Mar 23, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ryansobol created this gist
Mar 23, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ // Load required module var http = require('http'); var fs = require('fs'); var url = require('url'); http.createServer(function(request, response) { var pathname = __dirname + url.parse(request.url).pathname; fs.exists(pathname,function(exists) { if (exists) { fs.readFile('index.html', function(err, content) { response.end(content); }); } else { response.writeHead(404, { "Content-Type": "text/html" }); response.end("<h1>404 File Not Found</h1>"); } }); }).listen(8080);