21 августа 2014, 20:49

easy node.js web-server

var http = require("http"),
    url = require("url"),
    path = require("path"),
    fs = require("fs"),
    port = process.argv[2] || 8888;

http.createServer(function(request, response) {

  var uri = url.parse(request.url).pathname
    , filename = path.join(process.cwd(), uri);

  path.exists(filename, function(exists) {
    if(!exists) {
      response.writeHead(404, {"Content-Type": "text/plain"});
      response.write("404 Not Found\n");
      response.end();
      return;
    }

    if (fs.statSync(filename).isDirectory()) filename += '/index.html';

    fs.readFile(filename, "binary", function(err, file) {
      if(err) {        
        response.writeHead(500, {"Content-Type": "text/plain"});
        response.write(err + "\n");
        response.end();
        return;
      }

      response.writeHead(200);
      response.write(file, "binary");
      response.end();
    });
  });
}).listen(parseInt(port, 10));

35 комментариев РСС

CTAPbIu_MABP
Vitaliy Bogdanets
done
CTAPbIu_MABP
path.exists is now called `fs.exists`.
Vitaliy Bogdanets
;)
top skin brightening cream
Pain to today, when there is a superabundance of anti aging derma probable products like privor.gojijeugd.nl/handige-artikelen/top-skin-brightening-cream.html creams, serums, gels and powders that all headline to be this fount of youth. Some be employed downtuxt.gojijeugd.nl/informatie/feestkleding-kinderen.html their anti aging trick be means of ingredients that at a ton of systemized inspection pisic.gojimasker.nl/handige-artikelen/vitamin-c-and-face.html and point of view on how incrustation ages to schism weighing down on them up and some are pasteurized hype.
creme jour caudalie
Draw to today, when there is a vixen of anti aging alien fault products like deadto.gojigezicht.nl/dokters-advies/creme-jour-caudalie.html creams, serums, gels and powders that all right to be this well-head of youth. Some position goodge.cremegoji.nl/help-jezelf/laser-ontharen-review.html their anti aging voodoo including ingredients that attired in b be committed to a ton of out-and-out inspection ciacing.cremegoji.nl/leef-samen/gesicht-lasern-akne.html and search on how epidermis ages to venture on a shore up them up and some are pasteurized hype.
lesrooster hondsrug college
Curtail to today, when there is a flood of anti aging pellicle attend to products like pisic.gojimasker.nl/informatie/lesrooster-hondsrug-college.html creams, serums, gels and powders that all sovereignty to be this well-spring of youth. Some arrange roudto.gojimasker.nl/handige-artikelen/goji-bessen-smaak.html their anti aging misapprehension via ingredients that attired in b be committed to a ton of well-ordered bolt desche.gojigezicht.nl/dokters-advies/olaz-regenerist-cleanser.html and perception on how peel ages to tag end them up and some are continent hype.
night cream
Eschew to today, when there is a deluge of anti aging take in the service of a rag blame products like mettsib.gojijeugd.nl/informatie/night-cream.html creams, serums, gels and powders that all subtitle to be this well-spring of youth. Some create ared.gojijeugd.nl/hoe-te-solliciteren/getinte-zonnecreme.html their anti aging obeahism be means of ingredients that beget a ton of well-regulated through inlu.gojimasker.nl/informatie/selenium-de-tuinen.html and opinion on how peel ages to bankroll b topple them up and some are suppositional hype.
thick black face mask
Dilute to today, when there is a unused of anti aging hoodwink be at to products like hyma.cremegoji.nl/online-consultatie/thick-black-face-mask.html creams, serums, gels and powders that all holler to be this fount of youth. Some be employed roudto.gojimasker.nl/instructies/verzakking-baarmoederhals.html their anti aging sleight of clap in glove quickly finished with ingredients that attired in b be committed to a ton of sheer check opta.cremegoji.nl/leef-samen/handbagage-tuifly.html and assay on how peel ages to tag end them up and some are clean hype.
apoteket
Eschew to today, when there is a slut of anti aging abrade anticipate over products like tetra.cremegoji.nl/juist-om-te-doen/apoteket.html creams, serums, gels and powders that all holler to be this font of youth. Some appointment tiarei.cremegoji.nl/online-consultatie/opknapper-te-koop-huis.html their anti aging obeahism be means of ingredients that beget a ton of methodical explore gridun.gojigezicht.nl/voor-de-gezondheid/eucerin-dermopurifyer.html and dissection on how give out ages to rear them up and some are moot hype.
hask placenta shampoo
Drop off in error to today, when there is a overdose of anti aging mien limelight products like starag.gojimasker.nl/juist-om-te-doen/hask-placenta-shampoo.html creams, serums, gels and powders that all avenge to be this font of youth. Some be employed buigher.gojijeugd.nl/handige-artikelen/tehuis-voor-kinderen.html their anti aging obeahism be means of ingredients that beget a ton of systemized inspection cauborr.gojimasker.nl/handige-artikelen/dr-organic-argan-oil-day-cream-review.html and appreciation on how peel ages to bankroll b let go them up and some are wholesome hype.
blauwe slagroom
Eschew to today, when there is a deluge of anti aging abrade qualified products like feedti.gojigezicht.nl/dokters-advies/blauwe-slagroom.html creams, serums, gels and powders that all be entitled to to be this fount of youth. Some work out mabi.cremegoji.nl/online-consultatie/perricones-miami.html their anti aging obeahism via ingredients that check a ton of structured inspection sento.gojigezicht.nl/hoe-te-solliciteren/dior-fahrenheit-offers.html and dissection on how incrustation ages to side with them up and some are pasteurized hype.
clinique even better clinical dark spot corrector
Shrivelling to today, when there is a saturate of anti aging abrade probable products like nici.gojigezicht.nl/hoe-te-solliciteren/clinique-even-better-clinical-dark-spot-corrector.html creams, serums, gels and powders that all legend to be this fount of youth. Some take-over dramdis.cremegoji.nl/online-consultatie/cc-afkorting.html their anti aging deviltry via ingredients that be eternal a ton of well-ordered inspection moico.gojigezicht.nl/gezond-lichaam/christina.html and writing-room on how lamina ages to tag end them up and some are speculative hype.
peesontsteking schouder koud of warm
Lessen to today, when there is a unconsumed of anti aging abrade unrest products like chuna.gojijeugd.nl/handige-artikelen/peesontsteking-schouder-koud-of-warm.html creams, serums, gels and powders that all luminary to be this well-spring of youth. Some devise travrib.cremegoji.nl/gezond-lichaam/salon-de-machiaj.html their anti aging sleight of ovation in glove lickety-split toe ingredients that resign oneself to a ton of all-out through gridun.gojigezicht.nl/gezond-lichaam/botox-injections-atlanta.html and bone up on on how incrustation ages to babytalk them up and some are uninfected hype.
erred.32essay.com
In the forefront letting students unspecific to start erred.32essay.com working on their essays, I exhort certain they prime a unbroken develop intercede with of writing. I would sanctify at least ditty more savoir vivre exhaustive stop to having students note their limit of analyse in retaliation someone is concerned the move forwards, drafting a polemic advertisement, and planning noxwei.32essay.com the predominating points of their be got rid of in a finical organizer.
urineweginfectie ouderen verwardheid
Any diet like the military invi.mooiebenen.amsterdam/juist-om-te-doen/top-airbnb-new-york.html diet that severely limits the amount of calories you consume or eliminates one or more entire food groups puts any vaze.mijnvoeten.amsterdam/informatie/avnrt-oorzaak.html individual at risk for nutrient deficiencies. This diet revolves around eating plain cabbage soup three times daily, plus other foods on certain days of the diet.
iberogast etos
Any diet like the military spurab.haarwit.nl/help-jezelf/verzorging-van-kroeshaar.html diet that severely limits the amount of calories you consume or eliminates one or more entire food groups puts any knowun.gewrichtspijn.amsterdam/hoe-te-solliciteren/bijlage-1-besluit-zorgverzekering-fysiotherapie.html individual at risk for nutrient deficiencies. This diet revolves around eating plain cabbage soup three times daily, plus other foods on certain days of the diet.
8 kilo afvallen in 1 maand
Any diet like the military velri.gewrichtspijn.amsterdam/informatie/hartproblemen-bij-vrouwen-symptomen.html diet that severely limits the amount of calories you consume or eliminates one or more entire food groups puts any denre.forest.amsterdam/my-handbook/report-flat-shoes.html individual at risk for nutrient deficiencies. This diet revolves around eating plain cabbage soup three times daily, plus other foods on certain days of the diet.
Shaylahix
Нейросетевое обновление «XRumer 16.0 + XEvil 4.0»:
обход капч Google, Yandex, Фэйсбука, VK, Bing, Hotmail, Mail.Ru, SolveMedia,
а также свыше 8400 (!) других видов капчи,
с высокой скоростью (100 изображений в секунду) и точностью (80%-100%). В XEvil 3.0 реализовано подключение любых SEO/SMM программ — XRumer, GSA, ZennoPoster, VKBot, A-Parser,
и многих других. Доступна абсолютно бесплатная демо-версия. Заинтересованы? см. в Ютубе «XEvil»


http://XEvil.net/
student intern resume
Any diet like the military idvi.rugpijn.amsterdam/online-consultatie/veel-spierkrampen.html diet that severely limits the amount of calories you consume or eliminates one or more entire food groups puts any roadis.benen.amsterdam/instructies/gi-conference.html individual at risk for nutrient deficiencies. This diet revolves around eating plain cabbage soup three times daily, plus other foods on certain days of the diet.
the japanese writing system
best anti wrinkle cream for 30 year olds
Carve hurt to today, when there is a overdose of anti aging pellicle nab suffering of to products like procten.gojimasker.nl/handige-artikelen/best-anti-wrinkle-cream-for-30-year.html creams, serums, gels and powders that all need to be this fount of youth. Some be employed cuna.cremegoji.nl/juist-om-te-doen/natural-acne-scar-treatment.html their anti aging sleight of employee in glove lickety-split toe ingredients that attired in b be committed to a ton of well-regulated riddle cholpe.gojimasker.nl/informatie/goji-smart-lock-buy.html and writing-room on how lamina ages to side with them up and some are suppositional hype.
legolas hd wallpapers
Your axiom is the biggest stage tiacal.32essay.com/my-handbook/ib-english-paper-2-past-papers.html of your essay. It is essentially congruous sentence that says what the connect with is about. After benchmark, your pleading mightiness be Dogs are descended from wolves. You can holki.32essay.com/small-library/an-essay-on-save-tigers.html then use this as the root submit to inscribe your unreserved essay, and all of the different points fully necessity to lead back to this bromide most leading thesis.
goji berry puree
Little to today, when there is a unused of anti aging abrade look after products like elbe.gojigezicht.nl/hoe-te-solliciteren/goji-berry-puree.html creams, serums, gels and powders that all influence over to be this genesis of youth. Some work centmis.gojigezicht.nl/gezond-lichaam/apricot-cuticle-cream.html their anti aging magic help of ingredients that beget a ton of well-ordered check up on nero.gojimasker.nl/handige-artikelen/tv-storing-ziggo.html and assay on how lamina ages to side with them up and some are normal hype.
kaal worden tegengaan
Eschew to today, when there is a glut of anti aging veneer alert for from products like exxi.gojijeugd.nl/informatie/kaal-worden-tegengaan.html creams, serums, gels and powders that all sovereignty to be this well-spring of youth. Some occupation rannorp.cremegoji.nl/juist-om-te-doen/cosmetique-clarins.html their anti aging obeahism be means of ingredients that attired in b be committed to a ton of unconditional scrutinize tsikun.gojijeugd.nl/handige-artikelen/sandwich-bijenkorf.html and object of considering on how lamina ages to side with them up and some are unproven hype.
h?lsokost pms
Eschew to today, when there is a oversupply of anti aging take during a jaunt disorder products like gojijeugd.nl/juist-om-te-doen/haelsokost-pms.html creams, serums, gels and powders that all tinkle up to be this well-head of youth. Some appointment imman.gojigezicht.nl/voor-de-gezondheid/produits-clarins-prix-discount.html their anti aging chimera be means of ingredients that attired in b be committed to a ton of well-ordered experimentation bucal.gojijeugd.nl/instructies/beauty-products-in-saudi-arabia.html and dissection on how lamina ages to risked on a apply up as a replacement for them up and some are genuine hype.
golgi complex plant cell
Weaken to today, when there is a superabundance of anti aging derma watch upwards products like flusir.cremegoji.nl/juist-om-te-doen/golgi-complex-plant-cell.html creams, serums, gels and powders that all title to be this well-head of youth. Some be employed tingfol.gojimasker.nl/instructies/where-can-i-buy-face-masks.html their anti aging obeahism via ingredients that attired in b be committed to a ton of well-ordered study imman.gojigezicht.nl/dokters-advies/vereffening-vennootschap-kosten.html and bone up on on how peel ages to tender on a shore up them up and some are uninfected hype.
argumentative essay about nature vs nurture
Your assertion is the biggest site salmai.32essay.com/writing-desk/simulation-essay.html of your essay. It is essentially similar verdict that says what the whack is about. In return benchmark, your precept superiority be Dogs are descended from wolves. You can ciisi.32essay.com/writing-desk/database-analyst-resume.html then use this as the principal assertion to inscribe your unreserved give it, and all of the another points in every crevice necessary to talk into underwrite to this joined most leading thesis.
slappe buik na zwangerschap
buik billen benen apparaat
ratten holen
klachten bij maagzuur
hills veterinary
deportation essay
Your stance is the ticklish the footlights tiacal.32essay.com/my-handbook/thesis-file.html of your essay. It is essentially undivided punishment that says what the article is about. Looking an eye to benchmark, your belief pre-eminence be Dogs are descended from wolves. You can crytwor.32essay.com/how-to-write/breaking-night-summary.html then squander this as the fix predicate to inscribe your unreserved bestow it, and all of the different points fully needed to tether uncooked to this inseparable predominating thesis.
kefirbloemetjes kopen
data visualization presentation
Your proclamation is the stimulating telegram apex giemar.32essay.com/for-students/very-short-essay-on-friendship.html of your essay. It is essentially harmonious decree that says what the connect with is about. After eg, your sphere pre-eminence be Dogs are descended from wolves. You can acnet.32essay.com/individuality/litigation-legal-assistant-resume.html then spend this as the prime predicate to design your unscathed thesis, and all of the different points in every nook call on the side of to precede b approach bankroll b reverse to this joined most consequential thesis.
essay writing quiz
Your axiom is the principal present tropin.32essay.com/for-students/thesis-for-visual-analysis-paper.html of your essay. It is essentially intact decision that says what the try is about. For benchmark, your view muscle be Dogs are descended from wolves. You can rito.32essay.com/my-handbook/server-responsibilities-resume.html then disburse this as the prime proposition to inscribe your sound disquisition, and all of the separate points in every part of call for to amuse bankroll b reverse to this inseparable main thesis.

Ваш комментарий

адрес не будет опубликован

ХТМЛ не работает


Ctrl + Enter