From 4209ea3b37b5c0471720d5e6fd8c96933f309a67 Mon Sep 17 00:00:00 2001 From: "avencall@githardware" Date: Mon, 17 Sep 2012 17:01:29 +0200 Subject: change port and phantomjs path --- digikey.coffee | 4 +--- digikey.js | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 digikey.js diff --git a/digikey.coffee b/digikey.coffee index b372ca7..f1a9580 100644 --- a/digikey.coffee +++ b/digikey.coffee @@ -1,12 +1,10 @@ -#!/home/xilun/phantomjs-1.6.1-linux-x86_64-dynamic/bin/phantomjs - webpage = require('webpage') server = require('webserver').create() query_parse = /search\/([^&]+)/ url = 'http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=' -service = server.listen 8080, (request, response) -> +service = server.listen 8086, (request, response) -> page = webpage.create() search = query_parse.exec request.url diff --git a/digikey.js b/digikey.js old mode 100644 new mode 100755 index 9f4a571..ca4bc81 --- a/digikey.js +++ b/digikey.js @@ -1,3 +1,5 @@ +#!/usr/local/phamtomjs-1.6.1/bin/phantomjs + // Generated by CoffeeScript 1.3.3 (function() { var query_parse, server, service, url, webpage; @@ -10,7 +12,7 @@ url = 'http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name='; - service = server.listen(8080, function(request, response) { + service = server.listen(8086, function(request, response) { var page, search, thisUrl, tries; page = webpage.create(); search = query_parse.exec(request.url); -- cgit v1.2.3