クライアント#! /usr/bin/nodejs var fs = require ('fs'); var http = require ('http'); var url = require ('url'); var server = http.createServer( function(request, response) { response.writeHead(200, {'Content-Type': 'text/html'}); response.write('Good Morning!!'); var who = url.parse (decodeURI(request.url),true).query.who; response.write(who); response.end(); }).listen(3000); console.log('server running port at 3000');
http://localhost:3000/?who=John