Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jan 10, 2011
1 parent 59e160b commit caef7df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend.js
Expand Up @@ -13,13 +13,12 @@ var files = {
} }
}; };



var serve, search; var serve, search;


serve = function (req, resp) { serve = function (req, resp) {
resp.writeHead(200, {'Content-Type': files[req.url].mime}); resp.writeHead(200, {'Content-Type': files[req.url].mime});
resp.end(files[req.url].content); resp.end(files[req.url].content);
} };


var searchClient = http.createClient(9200, '127.0.0.1'); var searchClient = http.createClient(9200, '127.0.0.1');
search = function (req, resp) { search = function (req, resp) {
Expand All @@ -37,12 +36,12 @@ search = function (req, resp) {
var data = []; var data = [];
JSON.parse(body).hits.hits.forEach(function(hit) { JSON.parse(body).hits.hits.forEach(function(hit) {
data.push(hit._source); data.push(hit._source);
}) });
resp.writeHead(200, {'Content-Type': 'application/json'}); resp.writeHead(200, {'Content-Type': 'application/json'});
resp.end(JSON.stringify(data)); resp.end(JSON.stringify(data));
}); });
}); });
} };


http.createServer(function (request, response) { http.createServer(function (request, response) {
if (typeof files[request.url] !== 'undefined') { if (typeof files[request.url] !== 'undefined') {
Expand Down

0 comments on commit caef7df

Please sign in to comment.