{"id":6701,"date":"2018-04-06T07:04:03","date_gmt":"2018-04-06T07:04:03","guid":{"rendered":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=6701"},"modified":"2018-05-06T16:36:30","modified_gmt":"2018-05-06T16:36:30","slug":"node%e3%82%af%e3%83%83%e3%82%af%e3%83%96%e3%83%83%e3%82%af%e3%82%92%e8%aa%ad%e3%82%80","status":"publish","type":"post","link":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=6701","title":{"rendered":"Node\u30af\u30c3\u30af\u30d6\u30c3\u30af\u3092\u8aad\u3080"},"content":{"rendered":"<p><a href=\"https:\/\/www.oreilly.co.jp\/books\/9784873116068\/\">Node\u30af\u30c3\u30af\u30d6\u30c3\u30af<\/a>\u3092\u8aad\u3093\u3067\u3044\u307e\u3059\u3002\u672c\u304c\u66f8\u304b\u308c\u305f\u3068\u304d\u3068\u306f\uff0c\u30e2\u30b8\u30e5\u30fc\u30eb\u7b49\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u7570\u306a\u3063\u3066\u305d\u306e\u307e\u307e\u3067\u306f\u52d5\u304b\u306a\u3044\u3068\u3053\u308d\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u4ed6\u306b\u3082\u3067\u3066\u304d\u305d\u3046\u306a\u306e\u3067\u30e1\u30e2\u306b\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002node \u3084 npm \u306e\u77e5\u8b58\u304c\u305d\u3082\u305d\u3082\u306a\u3044\u306e\u3067\u3001\u672c\u306e\u307e\u307e\u306e\u30b3\u30fc\u30c9\u304c\u52d5\u304b\u306a\u3044\u3068\u306a\u308b\u3068\u82e6\u52b4\u3057\u305d\u3046\u3067\u3059\u3002node \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f 6.9.5 \u3067\u3059\u3002<\/p>\n<p><strong>p36\u3042\u305f\u308a<\/strong><br \/>\nconnect \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5909\u5316\u3057\u305f\u3088\u3046\u3067\u3059\u3002\u81ea\u5206\u306e\u74b0\u5883\u3067\u306f\u307e\u305a connect \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304b\u3089\u59cb\u3081\u307e\u3057\u305f\u3002\u30bd\u30fc\u30b9\u306e\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u79fb\u52d5\u3057\u3066\u3001package.json \u3092\u4f5c\u308b\u3068\u3053\u308d\u304b\u3089\u3067\u3059\u304c\u3001npm init \u3068\u6253\u3061\u8fbc\u3093\u3067\u3042\u3068\u306f enter \u3092\u9023\u6253\u3057\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/2\/2.1.1$ npm init\r\nThis utility will walk you through creating a package.json file.\r\nIt only covers the most common items, and tries to guess sensible defaults.\r\n\r\nSee `npm help json` for definitive documentation on these fields\r\nand exactly what they do.\r\n\r\nUse `npm install <pkg> --save` afterwards to install a package and\r\nsave it as a dependency in the package.json file.\r\n\r\nPress ^C at any time to quit.\r\nname: (2.1.1) \r\nversion: (1.0.0) \r\ndescription: \r\nentry point: (server.js) \r\ntest command: \r\ngit repository: \r\nkeywords: \r\nauthor: \r\nlicense: (ISC) \r\nAbout to write to \/home\/friend\/scripts\/2\/2.1.1\/package.json:\r\n\r\n{\r\n  \"name\": \"2.1.1\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"main\": \"server.js\",\r\n  \"scripts\": {\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\r\n    \"start\": \"node server.js\"\r\n  },\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\"\r\n}\r\n\r\n\r\nIs this ok? (yes) \r\n<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001package.json \u304c\u73fe\u5728\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u4f5c\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u3053\u3067 npm install connect \u3068\u3084\u308b\u3068\u5165\u308b\u3053\u3068\u306f\u5165\u308b\u306e\u3067\u3059\u304c\u3001node server.js \u3068\u6253\u3061\u8fbc\u3093\u3060\u6642\u306b\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/2\/2.1.1$ npm install connect\r\n2.1.1@1.0.0 \/home\/friend\/scripts\/2\/2.1.1\r\n\u2514\u2500\u252c connect@3.6.6 \r\n  \u251c\u2500\u252c debug@2.6.9 \r\n  \u2502 \u2514\u2500\u2500 ms@2.0.0 \r\n  \u251c\u2500\u252c finalhandler@1.1.0 \r\n  \u2502 \u251c\u2500\u2500 encodeurl@1.0.2 \r\n  \u2502 \u251c\u2500\u2500 escape-html@1.0.3 \r\n  \u2502 \u251c\u2500\u252c on-finished@2.3.0 \r\n  \u2502 \u2502 \u2514\u2500\u2500 ee-first@1.1.1 \r\n  \u2502 \u251c\u2500\u2500 statuses@1.3.1 \r\n  \u2502 \u2514\u2500\u2500 unpipe@1.0.0 \r\n  \u251c\u2500\u2500 parseurl@1.3.2 \r\n  \u2514\u2500\u2500 utils-merge@1.0.1 \r\n\r\nnpm WARN 2.1.1@1.0.0 No description\r\nnpm WARN 2.1.1@1.0.0 No repository field.\r\nfriend@xpython:~\/scripts\/2\/2.1.1$ node server.js \r\n\/home\/friend\/scripts\/2\/2.1.1\/server.js:6\r\n\t.use(connect.bodyParser())\r\n\t             ^\r\n\r\nTypeError: connect.bodyParser is not a function\r\n    at Object.<anonymous> (\/home\/friend\/scripts\/2\/2.1.1\/server.js:6:15)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n    at Module.runMain (module.js:604:10)\r\n    at run (bootstrap_node.js:394:7)\r\n    at startup (bootstrap_node.js:149:9)\r\n    at bootstrap_node.js:509:3\r\n<\/code><\/pre>\n<p>connect.bodyParser \u304c\u30d5\u30a1\u30f3\u30af\u30b7\u30e7\u30f3\u3067\u306a\u3044\u3068\u8a00\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002connect \u306b\u95a2\u3057\u3066\u8abf\u3079\u308b\u3068\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u304c\u3063\u3066\u52d5\u304b\u306a\u304f\u306a\u308b\u7b49\u306e\u8a18\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u305d\u308c\u3067\u3044\u3063\u305f\u3093\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u3066\u4f5c\u308a\u76f4\u3057\u307e\u3057\u305f\u3002\u4eca\u5ea6\u306e connect \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/2\/2.1.1$ npm install connect@2.6.1\r\nnpm WARN deprecated connect@2.6.1: connect 2.x series is deprecated\r\n2.1.1@1.0.0 \/home\/friend\/scripts\/2\/2.1.1\r\n\u2514\u2500\u252c connect@2.6.1 \r\n  \u251c\u2500\u2500 bytes@0.1.0 \r\n  \u251c\u2500\u2500 cookie@0.0.4 \r\n  \u251c\u2500\u2500 cookie-signature@0.0.1 \r\n  \u251c\u2500\u2500 crc@0.2.0 \r\n  \u251c\u2500\u252c debug@3.1.0 \r\n  \u2502 \u2514\u2500\u2500 ms@2.0.0 \r\n  \u251c\u2500\u2500 formidable@1.0.11 \r\n  \u251c\u2500\u2500 fresh@0.1.0 \r\n  \u251c\u2500\u2500 pause@0.0.1 \r\n  \u251c\u2500\u2500 qs@0.5.1 \r\n  \u2514\u2500\u252c send@0.1.0 \r\n    \u251c\u2500\u2500 mime@1.2.6 \r\n    \u2514\u2500\u2500 range-parser@0.0.4 \r\n\r\nnpm WARN 2.1.1@1.0.0 No description\r\nnpm WARN 2.1.1@1.0.0 No repository field.\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3067\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><strong>p38 \u3042\u305f\u308a<\/strong><br \/>\n\u30ec\u30b7\u30d4 2.2 \u3067\u3059\u304c\u3001 formidable 1.0.11 \u3092\u5229\u7528\u3057\u3066\u3082\u52d5\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/2\/2.2$ node server.js \r\n{ host: '192.168.100.18:8080',\r\n  'user-agent': 'Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko\/20100101 Firefox\/58.0',\r\n  accept: 'text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8',\r\n  'accept-language': 'ja,en-US;q=0.7,en;q=0.3',\r\n  'accept-encoding': 'gzip, deflate',\r\n  referer: 'http:\/\/192.168.100.18:8080\/',\r\n  'content-type': 'multipart\/form-data; boundary=---------------------------22430255711803',\r\n  'content-length': '70525',\r\n  cookie: 'io=cZZnNBSJM6tV7cEVAAAF',\r\n  connection: 'keep-alive',\r\n  'upgrade-insecure-requests': '1' }\r\nbuffer.js:732\r\n    throw new Error('Buffer.write(string, encoding, offset[, length]) ' +\r\n    ^\r\n\r\nError: Buffer.write(string, encoding, offset[, length]) is no longer supported\r\n    at Buffer.write (buffer.js:732:11)\r\n    at MultipartParser.initWithBoundary (\/home\/friend\/scripts\/2\/2.2\/node_modules\/formidable\/lib\/multipart_parser.js:66:17)\r\n    at IncomingForm._initMultipart (\/home\/friend\/scripts\/2\/2.2\/node_modules\/formidable\/lib\/incoming_form.js:272:10)\r\n    at IncomingForm._parseContentType (\/home\/friend\/scripts\/2\/2.2\/node_modules\/formidable\/lib\/incoming_form.js:231:12)\r\n    at IncomingForm.writeHeaders (\/home\/friend\/scripts\/2\/2.2\/node_modules\/formidable\/lib\/incoming_form.js:131:8)\r\n    at IncomingForm.parse (\/home\/friend\/scripts\/2\/2.2\/node_modules\/formidable\/lib\/incoming_form.js:84:8)\r\n    at Server.<anonymous> (\/home\/friend\/scripts\/2\/2.2\/server.js:22:12)\r\n    at emitTwo (events.js:106:13)\r\n    at Server.emit (events.js:191:7)\r\n    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12)<\/code><\/pre>\n<p>Buffer.write(string, encoding, offset[, length]) is no longer supported \u3068\u8a00\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<a href=\"https:\/\/github.com\/yaronn\/wcf.js\/issues\/16\">\u3053\u3053\u306b<\/a>\u3042\u3063\u305f\u306e\u3067\u3059\u304c node_modules\/formidable\/lib\/multipart_parser.js \u306e61\u884c\u306862\u884c\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">this.boundary.write('\\r\\n--', 0, 'ascii');\r\nthis.boundary.write(str, 4, 'ascii');<\/code><\/pre>\n<p>\u5f15\u6570\u304c\u5165\u308c\u66ff\u308f\u3063\u305f\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<br \/>\n\u3053\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3001uploads \u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u53d7\u3051\u53d6\u3063\u305f\u6642\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u51fa\u529b\u3067\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/2\/2.2$ node server.js \r\n{ host: '192.168.100.18:8080',\r\n  'user-agent': 'Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko\/20100101 Firefox\/58.0',\r\n  accept: 'text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8',\r\n  'accept-language': 'ja,en-US;q=0.7,en;q=0.3',\r\n  'accept-encoding': 'gzip, deflate',\r\n  referer: 'http:\/\/192.168.100.18:8080\/',\r\n  'content-type': 'multipart\/form-data; boundary=---------------------------15362245056078',\r\n  'content-length': '70525',\r\n  cookie: 'io=cZZnNBSJM6tV7cEVAAAF',\r\n  connection: 'keep-alive',\r\n  'upgrade-insecure-requests': '1' }\r\nFile {\r\n  domain: null,\r\n  _events: {},\r\n  _eventsCount: 0,\r\n  _maxListeners: undefined,\r\n  size: 0,\r\n  path: 'uploads\/0e44a26b4cf7f9ca9cc5171eb34c5136',\r\n  name: '',\r\n  type: 'application\/octet-stream',\r\n  hash: false,\r\n  lastModifiedDate: null,\r\n  _writeStream: \r\n   WriteStream {\r\n     _writableState: \r\n      WritableState {\r\n        objectMode: false,\r\n        highWaterMark: 16384,\r\n        needDrain: false,\r\n        ending: true,\r\n        ended: true,\r\n        finished: true,\r\n        decodeStrings: true,\r\n        defaultEncoding: 'utf8',\r\n        length: 0,\r\n        writing: false,\r\n        corked: 0,\r\n        sync: true,\r\n        bufferProcessing: false,\r\n        onwrite: [Function],\r\n        writecb: null,\r\n        writelen: 0,\r\n        bufferedRequest: null,\r\n        lastBufferedRequest: null,\r\n        pendingcb: 0,\r\n        prefinished: true,\r\n        errorEmitted: false,\r\n        bufferedRequestCount: 0,\r\n        corkedRequestsFree: [Object] },\r\n     writable: false,\r\n     domain: null,\r\n     _events: { open: [Object] },\r\n     _eventsCount: 1,\r\n     _maxListeners: undefined,\r\n     path: 'uploads\/0e44a26b4cf7f9ca9cc5171eb34c5136',\r\n     fd: null,\r\n     flags: 'w',\r\n     mode: 438,\r\n     start: undefined,\r\n     autoClose: true,\r\n     pos: undefined,\r\n     bytesWritten: 0 },\r\n  length: [Getter],\r\n  filename: [Getter],\r\n  mime: [Getter] }\r\nFile {\r\n  domain: null,\r\n  _events: {},\r\n  _eventsCount: 0,\r\n  _maxListeners: undefined,\r\n  size: 70180,\r\n  path: 'uploads\/652a5c26aef2ad639f04ca5fc40df784',\r\n  name: '\ufffd\ufffd\ufffd\ufffd2.png',\r\n  type: 'image\/png',\r\n  hash: false,\r\n  lastModifiedDate: 2018-04-06T08:42:59.915Z,\r\n  _writeStream: \r\n   WriteStream {\r\n     _writableState: \r\n      WritableState {\r\n        objectMode: false,\r\n        highWaterMark: 16384,\r\n        needDrain: false,\r\n        ending: true,\r\n        ended: true,\r\n        finished: true,\r\n        decodeStrings: true,\r\n        defaultEncoding: 'utf8',\r\n        length: 0,\r\n        writing: false,\r\n        corked: 0,\r\n        sync: false,\r\n        bufferProcessing: false,\r\n        onwrite: [Function],\r\n        writecb: null,\r\n        writelen: 0,\r\n        bufferedRequest: null,\r\n        lastBufferedRequest: null,\r\n        pendingcb: 0,\r\n        prefinished: true,\r\n        errorEmitted: false,\r\n        bufferedRequestCount: 0,\r\n        corkedRequestsFree: [Object] },\r\n     writable: false,\r\n     domain: null,\r\n     _events: {},\r\n     _eventsCount: 0,\r\n     _maxListeners: undefined,\r\n     path: 'uploads\/652a5c26aef2ad639f04ca5fc40df784',\r\n     fd: null,\r\n     flags: 'w',\r\n     mode: 438,\r\n     start: undefined,\r\n     autoClose: true,\r\n     pos: undefined,\r\n     bytesWritten: 70180,\r\n     closed: true },\r\n  length: [Getter],\r\n  filename: [Getter],\r\n  mime: [Getter] }\r\nend<\/code><\/pre>\n<p><strong>3.1.1 p62 \u3042\u305f\u308a<\/strong><br \/>\n<a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01-300x197.png\" alt=\"\" width=\"300\" height=\"197\" class=\"aligncenter size-medium wp-image-6734\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01-300x197.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01-768x503.png 768w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01-1024x671.png 1024w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01-600x393.png 600w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node01.png 1173w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u300cclient.html \u30d5\u30a1\u30a4\u30eb\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f\u3068\u300d\u3068\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f WEB \u30b5\u30fc\u30d0\u30fc \u4e0a\u306b\u3042\u308b\u30b5\u30a4\u30c8\uff1a http:\/\/localhost:8080\/client.html \u3092\u958b\u304f\u306e\u3067\u306f\u306a\u304f\u3066\uff0c\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u8868\u793a\u3055\u305b\u308b\u3068\u3044\u3046\u8a71\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001file:\/\/\/home\/friend\/scripts\/3\/3.1.1\/client.html \u306a\u3069\u3068 URL \u8868\u793a\u306f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>3.2 p63 \u3042\u305f\u308a<\/strong><br \/>\n\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var isTxt = (obj[key] && {}.toString.call(obj[key]) !== '[object Object]');<\/code><\/pre>\n<p>\u307e\u305a {} \u304c Object \u306e\u4ee3\u308f\u308a\u3060\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u6b63\u3057\u3044\u306e\u304b\u306a\u3002<br \/>\n\u4f8b\u3048\u3070 <code> obj[key] <\/code>\u306e\u5185\u5bb9\u304c <code>{ name: 'Ryan Dahl',  irc: 'ryah',  twitter: 'ryah',  github: [ 'ry', joyent' ],  location: 'San Francisco, USA',  description: 'Creator of node.js' } <\/code>\u3068\u3044\u3046\u611f\u3058\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\u3068\u3057\u3066\u3001\u305d\u3046\u3059\u308b\u3068 <code>{}.toString.call(obj[key])<\/code> \u304c <code>[object Object]<\/code> \u3068\u306a\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u3053\u308c\u3089\u306e\u30a2\u30f3\u30c9\u3092\u3068\u308b\u3068\u5f97\u3089\u308c\u308b\u3082\u306e\u306f\u3000<code>[object Object]<\/code> \u3067\u3059\u30021 \u304b 0 \u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08\u5e38\u8b58\u306a\u306e\u304b\uff09\u3002<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Operators\/Logical_Operators\">\u53c2\u8003\u30b5\u30a4\u30c8<\/a>\u306b\u3088\u308b\u3068\u3001\u524d\u306e\u9805 \u3092 false \u3068\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u5834\u5408\u306f\u3001\u524d\u306e\u9805 \u3092\u8fd4\u3059\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u5f8c\u308d\u306e\u9805 \u3092\u8fd4\u3059\u69d8\u3067\u3059\u3002<\/p>\n<p><strong>3.3 p73 \u3042\u305f\u308a<\/strong><br \/>\n<a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node20180428a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node20180428a-300x174.png\" alt=\"\" width=\"300\" height=\"174\" class=\"aligncenter size-medium wp-image-6747\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node20180428a-300x174.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/node20180428a.png 555w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u3053\u3053\u306f jQuery \u3067\u66f8\u304b\u308c\u305f\u30b3\u30fc\u30c9\u306b <code>$.get('http:\/\/localhost:8080\/ . . . <\/code> \u3068\u3042\u3063\u3066\uff0c\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u305f\u30de\u30b7\u30f3\u4e0a\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f\u3053\u3068\u304c\u524d\u63d0\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\uff0c\u305d\u308c\u3092\u30b5\u30fc\u30d0\u30fc\u306e URL \u306b\u66f8\u304d\u63db\u3048\u305f\u3089\u4ed6\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3067\u3082\u4e0a\u624b\u304f\u52d5\u304d\u307e\u3057\u305f\u3002 <\/p>\n<p><strong>3.4 p83 \u3042\u305f\u308a<\/strong><br \/>\n<code>npm install colors@0.6.0<\/code> \u3067 colors \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u52d5\u304b\u3057\u3066\u307f\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/3\/3.4$ node twitter_trends.js \r\n_http_outgoing.js:358\r\n    throw new TypeError('The header content contains invalid characters');\r\n    ^\r\n\r\nTypeError: The header content contains invalid characters\r\n    at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:358:11)\r\n    at new ClientRequest (_http_client.js:86:14)\r\n    at Object.exports.request (http.js:31:10)\r\n    at Object.exports.get (http.js:35:21)\r\n    at makeCall (\/home\/friend\/scripts\/3\/3.4\/twitter_trends.js:5:7)\r\n    at Object.<anonymous> (\/home\/friend\/scripts\/3\/3.4\/twitter_trends.js:52:1)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)<\/code><\/pre>\n<p>\u826f\u304f\u5206\u304b\u308a\u307e\u305b\u3093\u304c\u3001\u30b3\u30fc\u30c9\u306b\u3042\u308b\u65e5\u672c\u8a9e\uff08\u30c8\u30ec\u30f3\u30c9\uff09\u3092\u82f1\u8a9e\uff08trend\uff09\u306b\u5909\u63db\u3057\u307e\u3057\u305f\u3002\u3044\u304f\u3089\u304b\u52d5\u304d\u51fa\u3057\u307e\u3057\u305f\u3002\u51fa\u529b\u306f\u9577\u904e\u304e\u308b\u306e\u3067\u5168\u90e8\u306f\u8f09\u305b\u307e\u305b\u3093\u3002\u6700\u5f8c\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/3\/3.4$ node twitter_trends.js \r\nIncomingMessage {\r\n  _readableState: \r\n   ReadableState {\r\n     objectMode: false,\r\n     highWaterMark: 16384,\r\n     buffer: BufferList { head: null, tail: null, length: 0 },\r\n     length: 0,\r\n     pipes: null,\r\n     pipesCount: 0,\r\n     flowing: null,\r\n     ended: false,\r\n     endEmitted: false,\r\n     reading: false,\r\n     sync: true,\r\n     needReadable: false,\r\n     emittedReadable: false,\r\n     readableListening: false,\r\n     resumeScheduled: false,\r\n     defaultEncoding: 'utf8',\r\n     ranOut: false,\r\n     awaitDrain: 0,\r\n     readingMore: true,\r\n     decoder: null,\r\n     encoding: null },\r\n  readable: true,\r\n  domain: null,\r\n  _events: { end: [Function: responseOnEnd] },\r\n  _eventsCount: 1,\r\n  _maxListeners: undefined,\r\n\r\n\u9014\u4e2d\u7565\r\n\r\n     _header: 'GET \/1\/trends\/1.json HTTP\/1.1\\r\\nUser-Agent: Node Cookbook: Twitter trend\\r\\nHost: api.twitter.com\\r\\nConnection: close\\r\\n\\r\\n',\r\n     _headers: \r\n      { 'user-agent': 'Node Cookbook: Twitter trend',\r\n        host: 'api.twitter.com' },\r\n     _headerNames: { 'user-agent': 'User-Agent', host: 'Host' },\r\n     _onPendingData: null,\r\n     agent: \r\n      Agent {\r\n        domain: null,\r\n        _events: [Object],\r\n        _eventsCount: 1,\r\n        _maxListeners: undefined,\r\n        defaultPort: 80,\r\n        protocol: 'http:',\r\n        options: [Object],\r\n        requests: {},\r\n        sockets: [Object],\r\n        freeSockets: {},\r\n        keepAliveMsecs: 1000,\r\n        keepAlive: false,\r\n        maxSockets: Infinity,\r\n        maxFreeSockets: 256 },\r\n     socketPath: undefined,\r\n     timeout: undefined,\r\n     method: 'GET',\r\n     path: '\/1\/trends\/1.json',\r\n     _ended: false,\r\n     parser: \r\n      HTTPParser {\r\n        '0': [Function: parserOnHeaders],\r\n        '1': [Function: parserOnHeadersComplete],\r\n        '2': [Function: parserOnBody],\r\n        '3': [Function: parserOnMessageComplete],\r\n        '4': null,\r\n        _headers: [],\r\n        _url: '',\r\n        _consumed: false,\r\n        socket: [Object],\r\n        incoming: [Circular],\r\n        outgoing: [Circular],\r\n        maxHeaderPairs: 2000,\r\n        onIncoming: [Function: parserOnIncomingClient] },\r\n     res: [Circular] } }\r\n\r\n\/home\/friend\/scripts\/3\/3.4\/twitter_trends.js:42\r\n\t\t\tthrow('\u30b5\u30fc\u30d0\u304c\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\uff1a' + res.statusCode);\r\n\t\t\t^\r\n\u30b5\u30fc\u30d0\u304c\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\uff1a403\r\nfriend@xpython:~\/scripts\/3\/3.4$ <\/code><\/pre>\n<p>403 \u306f\u30a2\u30af\u30bb\u30b9\u304c\u7981\u6b62\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\uff08forbidden\uff09\u3002<code>search.twitter.com<\/code> \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068 <code>https:\/\/twitter.com\/search-home<\/code> \u306b\u98db\u3070\u3055\u308c\u307e\u3059\u3002\u53e4\u3044\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066 <code>http:\/\/search.twitter.com\/search.json?q=java<\/code> \u306e\u3088\u3046\u306a\u30b5\u30fc\u30c1\u3092\u304b\u3051\u3066\u307f\u308b\u3068\u3001<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">{\"errors\":[{\"message\":\"The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https:\/\/dev.twitter.com\/docs\/api\/1.1\/overview.\",\"code\":64}]}<\/code><\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u306e\u8fd4\u4e8b\u304c\u6765\u307e\u3059\u3002API \u306e\u5909\u66f4\u3084\u3001<code>https<\/code> \u306b\u5909\u308f\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u3063\u3066\u3001\u304b\u306a\u308a\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u307f\u305f\u3044\u3067\u3059\u3002\u4f55\u56de\u304b\u5b9f\u884c\u3059\u308b\u3068\u8fd4\u4e8b\u3082\u8fd4\u3089\u306a\u304f\u306a\u3063\u3066\u3001\u305f\u3060 403 \u304c\u8fd4\u308b\u3060\u3051\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u3053\u306f\u8ae6\u3081\u307e\u3057\u3087\u3046\u30023.4.1 \u3082\u52d5\u304b\u305b\u307e\u305b\u3093\u3002<\/p>\n<p><strong>4.2 p96\u3042\u305f\u308a<\/strong><br \/>\nmysql \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092 0.9.6 \u3068\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082\u52d5\u304b\u306a\u3044\u3002\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001\u63a5\u7d9a\u304b\u3089\u4e0a\u624b\u304f\u3044\u3063\u3066\u3044\u306a\u3044\u69d8\u5b50\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.2$ node mysql.js \r\nevents.js:160\r\n      throw er; \/\/ Unhandled 'error' event\r\n      ^\r\n\r\nError: Access denied for user 'root'@'localhost' (using password: YES)\r\n    at Function.Client._packetToUserObject (\/home\/friend\/scripts\/4\/4.2\/node_modules\/mysql\/lib\/client.js:394:7)\r\n    at Client._handlePacket (\/home\/friend\/scripts\/4\/4.2\/node_modules\/mysql\/lib\/client.js:307:43)\r\n    at emitOne (events.js:96:13)\r\n    at Parser.emit (events.js:188:7)\r\n    at emitPacket (\/home\/friend\/scripts\/4\/4.2\/node_modules\/mysql\/lib\/parser.js:71:14)\r\n    at Parser.write (\/home\/friend\/scripts\/4\/4.2\/node_modules\/mysql\/lib\/parser.js:576:7)\r\n    at emitOne (events.js:96:13)\r\n    at Socket.emit (events.js:188:7)\r\n    at readableAddChunk (_stream_readable.js:176:18)\r\n    at Socket.Readable.push (_stream_readable.js:134:10)\r\n<\/code><\/pre>\n<p>\u3057\u304b\u305f\u304c\u306a\u3044\u306e\u3067\u3001\u65b0\u3057\u3044 mysql \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\uff082.15.0\uff09\u3002\u63a5\u7d9a\u304b\u3089\u7570\u306a\u308b\u3088\u3046\u3060\u3002\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u3042\u308b test.js \u3092\u591a\u5c11\u66f8\u304d\u63db\u3048\u3066\u52d5\u304b\u3057\u3066\u307f\u305f\u3002\u7279\u306b\u30a8\u30e9\u30fc\u3067\u306f\u306a\u3044\u66f8\u304d\u63db\u3048\u3082\u3042\u308b\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var mysql = require('mysql');\r\n\/\/var client = mysql.createClient({\r\n\/\/\tuser: 'root',\r\n\/\/\tpassword: '********'\r\n\/\/});\r\n\r\nvar client = mysql.createConnection({\r\n\thost: 'localhost',\r\n\tuser: 'root',\r\n\tpassword: '********'\r\n});\r\n\r\n\/\/client.query('CREATE DATABASE quotes');\r\n\r\nclient.query('CREATE DATABASE IF NOT EXISTS quotes');\r\n\r\n\/\/client.useDatabase('quotes');\r\n\r\nclient.query('USE quotes');\r\n\r\n\r\nclient.query('CREATE TABLE quotes.quotes (' +\r\n\t'id INT NOT NULL AUTO_INCREMENT, ' +\r\n\t'author VARCHAR(128) NOT NULL, ' +\r\n\t'quote TEXT NOT NULL, PRIMARY KEY(id)' +\r\n\t')'\r\n);\r\n\r\n\r\nclient.end();<\/code><\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u30c6\u30fc\u30d6\u30eb\u306f\u4f5c\u6210\u3055\u308c\u305f\u3002<br \/>\nmysql.js \u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3066\u307f\u307e\u3057\u305f\u3002\u4e00\u5fdc\u3053\u308c\u3067\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var mysql = require('mysql');\r\n\r\nvar client = mysql.createConnection({\r\n\thost:'localhost',\r\n\tuser: 'root',\r\n\tpassword: '********'\r\n});\r\n\r\nclient.query('CREATE DATABASE IF NOT EXISTS quotes');\r\nclient.query('USE quotes');\r\n\r\nclient.query('CREATE TABLE IF NOT EXISTS quotes.quotes (' +\r\n\t'id INT NOT NULL AUTO_INCREMENT, ' +\r\n\t'author VARCHAR(128) NOT NULL, ' +\r\n\t'quote TEXT NOT NULL, PRIMARY KEY(id)' +\r\n\t')'\r\n);\r\n\r\n\r\nvar ignore = [mysql.ERROR_DB_CREATE_EXISTS, mysql.ERROR_TABLE_EXISTS_ERROR];\r\n\r\nclient.on('error', function(err){\r\n\tif(ignore.indexOf(err.number) > -1) { return; }\r\n\tthrow err;\r\n});\r\n\r\nclient.query('INSERT INTO quotes.quotes (' +\r\n\t'author, quote) ' +\r\n\t'VALUES (\"kondo\", \"test words\");'\r\n);\r\n\r\n\r\nclient.end();<\/code><\/pre>\n<p>\u65e5\u672c\u8a9e\u304c\u901a\u3089\u306a\u3044\u306e\u3067\u3001\u65e5\u672c\u8a9e\u4ee5\u5916\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u66f8\u304d\u8fbc\u3093\u3067\u307f\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u51e6\u7406\u306e\u8a18\u8ff0\u306f\u5909\u66f4\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u6b63\u3057\u3044\u306e\u304b\u3069\u3046\u304b\u306f\u5206\u304b\u3089\u306a\u3044\u3002<\/p>\n<p><strong>4.2.2 p101\u3042\u305f\u308a<\/strong><br \/>\n\u6700\u5f8c\u306b\u8868\u793a\u3059\u308b\u3068\u3053\u308d\u306b\u3042\u308b on \u304c\u4e0a\u624b\u304f\u52d5\u4f5c\u3057\u306a\u3044\u306e\u3067\u3001\u66f8\u304d\u63db\u3048\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var params = {\r\n\tauthor: process.argv[2],\r\n\tquote: process.argv[3]\r\n}\r\n\r\nvar mysql = require('mysql');\r\nvar client = mysql.createConnection({\r\n\tuser: 'root',\r\n\tpassword: '********'\r\n\t\/\/debug: 'true'\r\n});\r\n\r\nclient.query('CREATE DATABASE IF NOT EXISTS quotes');\r\nclient.query('USE quotes');\r\n\r\nclient.query('CREATE TABLE IF NOT EXISTS quotes.quotes (' +\r\n\t'id INT NOT NULL AUTO_INCREMENT, ' +\r\n\t'author VARCHAR(128) NOT NULL, ' +\r\n\t'quote TEXT NOT NULL, PRIMARY KEY(id)' +\r\n\t')'\r\n);\r\n\r\nvar ignore = [mysql.ERROR_DB_CREATE_EXISTS, mysql.ERROR_TABLE_EXISTS_ERROR];\r\n\r\nclient.on('error', function(err){\r\n\tif(ignore.indexOf(err.number) > -1) { return; }\r\n\tthrow err;\r\n});\r\n\r\nif(params.author && params.quote) {\r\n\tclient.query('INSERT INTO quotes.quotes (' +\r\n\t'author, quote) ' +\r\n\t'VALUES(?, ?);', [params.author, params.quote]);\r\n}\r\n\r\nif(params.author) {\r\n\tclient.query('SELECT * FROM quotes WHERE ' + 'author LIKE ' + client.escape(params.author), function(err, raws, fields){\r\n\t\tif (err) {\r\n\t\t\tconsole.log('err:' + err);\r\n\t\t} else {\r\n\t\t\traws.forEach(function(raw){\r\n\t\t\t\tconsole.log('%s: %s', raw.author, raw.quote);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t});\r\n}\r\n\r\nclient.end();<\/code><\/pre>\n<p><strong>4.3 p102\u3042\u305f\u308a<\/strong><br \/>\nmongodb \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\uff081.1.7\uff09\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082\u52d5\u304b\u306a\u3044\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.3$ node quotes.js 'kondo' 'first'\r\n\/home\/friend\/scripts\/4\/4.3\/node_modules\/mongodb\/lib\/mongodb\/db.js:869\r\n      || (selector['mapreduce'] && selector.out = 'inline')) {\r\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nReferenceError: Invalid left-hand side in assignment\r\n    at Object.exports.runInThisContext (vm.js:76:16)\r\n    at Module._compile (module.js:542:28)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n    at Module.require (module.js:497:17)\r\n    at require (internal\/module.js:20:19)\r\n    at \/home\/friend\/scripts\/4\/4.3\/node_modules\/mongodb\/lib\/mongodb\/index.js:29:17\r\n    at Array.forEach (native)\r\n<\/code><\/pre>\n<p>mongodb \u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u3002\u4e2d\u8eab\u306f\u7a7a\u3067\u3059\u304c\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.3$ mongo\r\nMongoDB shell version: 2.6.10\r\nconnecting to: test\r\nWelcome to the MongoDB shell.\r\nFor interactive help, type \"help\".\r\nFor more comprehensive documentation, see\r\n\thttp:\/\/docs.mongodb.org\/\r\nQuestions? Try the support group\r\n\thttp:\/\/groups.google.com\/group\/mongodb-user\r\n> use quates\r\nswitched to db quates\r\n> db.quates.find()\r\n> quit()\r\nfriend@xpython:~\/scripts\/4\/4.3$ \r\n<\/code><\/pre>\n<p>mongodb \u3092\u65b0\u3057\u3044\u3082\u306e\u306b\u5165\u308c\u66ff\u3048\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.3$ npm install mongodb\r\n4.3@1.0.0 \/home\/friend\/scripts\/4\/4.3\r\n\u2514\u2500\u252c mongodb@3.0.7 \r\n  \u2514\u2500\u252c mongodb-core@3.0.7 \r\n    \u251c\u2500\u2500 bson@1.0.6 \r\n    \u2514\u2500\u252c require_optional@1.0.1 \r\n      \u251c\u2500\u2500 resolve-from@2.0.0 \r\n      \u2514\u2500\u2500 semver@5.5.0 \r\n\r\nnpm WARN 4.3@1.0.0 No description\r\nnpm WARN 4.3@1.0.0 No repository field.\r\n<\/code><\/pre>\n<p>\u518d\u3073\u5b9f\u884c\u3059\u308b\u3068\u3001\u4eca\u5ea6\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.3$ node quotes.js 'kondo' 'first'\r\n\/home\/friend\/scripts\/4\/4.3\/quotes.js:7\r\nclient.open(function (err, client) {\r\n       ^\r\n\r\nTypeError: client.open is not a function\r\n    at Object.<anonymous> (\/home\/friend\/scripts\/4\/4.3\/quotes.js:7:8)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n    at Module.runMain (module.js:604:10)\r\n    at run (bootstrap_node.js:394:7)\r\n    at startup (bootstrap_node.js:149:9)\r\n    at bootstrap_node.js:509:3\r\n<\/code><\/pre>\n<p>\u304b\u306a\u308a\u30b3\u30de\u30f3\u30c9\u304c\u5909\u5316\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3066\u3084\u3063\u3068\u52d5\u304d\u307e\u3057\u305f(<a href=\"https:\/\/github.com\/mongodb\/node-mongodb-native\">\u53c2\u8003\u30b5\u30a4\u30c8<\/a>)\u3002server \u4e91\u3005\u3068\u3044\u3046\u8a18\u8ff0\u306f\u7121\u304f\u306a\u308a\u307e\u3057\u305f\u3002insertMany \u3067\u66f8\u304d\u8fbc\u3093\u3067\u3044\u307e\u3059\u304c\u3001\u66f8\u304d\u8fbc\u3080\u30c7\u30fc\u30bf\u306f\u4e00\u500b\u3067\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var mongo = require('mongodb');\r\n\r\nvar mongoClient = mongo.MongoClient;\r\n\r\nvar params = { author: process.argv[2], quote: process.argv[3] };\r\n\r\nmongoClient.connect('mongodb:\/\/localhost:27017', function (err, client){\r\n\t\/\/console.log(client);\r\n\tvar quotes = client.db(\"quotes\");\r\n\tvar collection = quotes.collection('quotes');\r\n\r\n\tif(params.author && params.quote) {\r\n\t\tcollection.insertMany([{ author: params.author, quote: params.quote }], function (err, result) {\r\n\t\t\tconsole.log(result);\r\n});\r\n\t}\r\n\r\n\tif(params.author) {\r\n\t\tcollection.find({ author: params.author }).each(function(err, doc) {\r\n\t\t\tif(err) { throw err; }\r\n\t\t\tif(doc) {\r\n\t\t\t\tconsole.log('%s: %s', doc.author, doc.quote);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tclient.close();\r\n\t\t});\r\n\t\treturn;\r\n\t}\r\n\tclient.close();\r\n});<\/code><\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\u3067\u3059\u3002\u4f55\u56de\u304b\u52d5\u304b\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3059\u3067\u306b\u3044\u304f\u3064\u304b\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/4\/4.3$ node quotes.js 'kondo' 'second'\r\n{ result: { ok: 1, n: 1 },\r\n  ops: \r\n   [ { author: 'kondo',\r\n       quote: 'second',\r\n       _id: 5aeb487c1e3b7826aee844a7 } ],\r\n  insertedCount: 1,\r\n  insertedIds: { '0': 5aeb487c1e3b7826aee844a7 } }\r\nfriend@xpython:~\/scripts\/4\/4.3$ node quotes.js 'kondo' 'second'\r\n{ result: { ok: 1, n: 1 },\r\n  ops: \r\n   [ { author: 'kondo',\r\n       quote: 'second',\r\n       _id: 5aeb495e458d302727c9b54c } ],\r\n  insertedCount: 1,\r\n  insertedIds: { '0': 5aeb495e458d302727c9b54c } }\r\nkondo: first\r\nkondo: second\r\nkondo: second\r\n<\/code><\/pre>\n<p><strong>4.3.1 p105 \u3042\u305f\u308a<\/strong><br \/>\nensureIndex \u3067\u306f\u306a\u304f\u3001createIndex \u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u306a\u304b\u306a\u304b\u6c17\u3065\u304b\u306a\u304b\u3063\u305f\u3068\u3053\u308d\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u63a5\u7d9a\u304c\u975e\u540c\u671f\u3060\u3068\u3044\u3046\u70b9\u3067\u3059\u3002client.close() \u3092\u5909\u306a\u3068\u3053\u308d\u306b\u66f8\u3044\u3066\u3044\u308b\u3068\u63a5\u7d9a\u304c\u5207\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var mongo = require('mongodb');\r\nvar mongoClient = mongo.MongoClient;\r\n\r\nmongoClient.connect('mongodb:\/\/localhost:27017', function (err, client){\r\n\t\/\/console.log(client);\r\n\tvar quotes = client.db(\"quotes\");\r\n\tvar collection = quotes.collection('quotes');\r\n\r\n\tcollection.createIndex({'author':1}, function(err, result) {\r\n\t\tif(err) { throw err; }\r\n\t\tcollection.distinct('author', function(err, result) {\r\n\t\t\tif(err) { throw err; client.close();}\r\n\t\t\tconsole.log(result.join('\\n'));\r\n\t\t\tclient.close();\r\n\t\t});\r\n\t});\r\n});\r\n<\/code><\/pre>\n<p><strong>4.3.2 p107 \u3042\u305f\u308a<\/strong><br \/>\n\u3053\u3053\u3067\u306f\u3001\u5148\u3068\u540c\u3058\u5909\u66f4\u306f\u3059\u308b\u3082\u306e\u306e\u3001\u65b0\u3057\u3044\u5909\u66f4\u70b9\u306f\u306a\u3044\u3002\u5f8c\u534a\u306f\u305d\u306e\u307e\u307e\u52d5\u304f\u3002mongo.ObjectID \u3084 {safe:true} \u3082\u305d\u306e\u307e\u307e\u3067\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">var mongo = require('mongodb');\r\nvar params = { id: process.argv[2], voter: process.argv[3] };\r\nvar mongoClient = mongo.MongoClient;\r\n\r\nmongoClient.connect('mongodb:\/\/localhost:27017', function (err, client){\r\n\tvar quotes = client.db(\"quotes\");\r\n\tvar collection = quotes.collection('quotes');\r\n\r\n\tif(params.id) {\r\n\t\tcollection.update({_id: new mongo.ObjectID(params.id)},\r\n\t\t\t{$inc: {votes: 1}},\r\n\t\t\t{safe:true}, function(err){\r\n\t\t\t\tif(err) { throw err; }\r\n\t\t\t\tcollection.find().sort({votes: -1}).limit(10).each(function (err, doc) {\r\n\t\t\t\t\tif(err) { throw err; }\r\n\t\t\t\t\tif(doc) {\r\n\t\t\t\t\t\tvar votes = (doc.votes) || 0;\r\n\t\t\t\t\t\tconsole.log(doc.author, doc.quote, votes);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tclient.close();\r\n\t\t\t\t});\r\n\t\t});\r\n\t\treturn;\r\n\t}\r\n\r\n\tcollection.find().each(function(err, doc){\r\n\t\tif(err) { throw err; }\r\n\t\tif(doc) { console.log(doc._id, doc.quote); return; }\r\n\t\tclient.close();\r\n\t});\r\n});<\/code><\/pre>\n<p><strong>4.4 \u4ee5\u964d\u306e4\u7ae0<\/strong><br \/>\nmongoskin \u3092\u52d5\u304b\u305b\u306a\u3044\u3002\u60c5\u5831\u3082\u3042\u307e\u308a\u898b\u3042\u305f\u3089\u306a\u3044\u306e\u3067\u3001\u8aad\u307e\u305a\u306b\u3001\u98db\u3070\u3057\u307e\u3059\u3002\u305d\u306e\u4ed6\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u95a2\u9023\u306e\u3068\u3053\u308d\u3082\u98db\u3070\u3057\u307e\u3059\u3002<\/p>\n<p><strong>5.1 p135 \u3042\u305f\u308a<\/strong><br \/>\nwebsocket \u3092\u30d0\u30fc\u30b8\u30e7\u30f3 \u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u306f\u3044\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.1$ npm install websocket@1.0.7\r\n\r\n> websocket@1.0.7 install \/home\/friend\/scripts\/5\/5.1\/node_modules\/websocket\r\n> node install.js\r\n\r\n[websocket v1.0.7] Attempting to compile native extensions.\r\n[websocket v1.0.7]\r\n    Native code compile failed!!\r\n    On Windows, native extensions require Visual Studio and Python.\r\n    On Unix, native extensions require Python, make and a C++ compiler.\r\n    Start npm with --websocket:verbose to show compilation output (if any).\r\n5.1@1.0.0 \/home\/friend\/scripts\/5\/5.1\r\n\u2514\u2500\u2500 websocket@1.0.7 \r\n\r\nnpm WARN 5.1@1.0.0 No description\r\nnpm WARN 5.1@1.0.0 No repository field.\r\n<\/code><\/pre>\n<p>\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001localhost \u304b\u3089\u306e\u307f\u3067\u3059\u304c\u52d5\u304d\u307e\u3057\u305f\u3002\u30a2\u30c9\u30ec\u30b9\u3092 192.168.100.18 \u306a\u3069\u3068\u8a18\u5165\u3057\u305f\u5834\u5408\u306b\u306f\u30a2\u30af\u30bb\u30b9\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.1$ node server.js \r\nWarning: Native modules not compiled.  XOR performance will be degraded.\r\nWarning: Native modules not compiled.  UTF-8 validation disabled.\r\nhttp:\/\/192.168.100.18:8080\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\r\nhttp:\/\/192.168.100.18:8080\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306f\u8a31\u53ef\u3055\u308c\u3066\u3044\u307e\u305b\u3093\r\n\"kondo\" \u3092 http:\/\/localhost:8080 \u304b\u3089\u53d7\u4fe1\r\n\"kondo2\" \u3092 http:\/\/localhost:8080 \u304b\u3089\u53d7\u4fe1\r\n\"Hello\" \u3092 http:\/\/localhost:8080 \u304b\u3089\u53d7\u4fe1\r\n<\/code><\/pre>\n<p>\u4e0b\u56f3\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u65b9\u3067\u3059\u3002<br \/>\n<a href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop-300x173.png\" alt=\"\" width=\"300\" height=\"173\" class=\"aligncenter size-medium wp-image-6792\" srcset=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop-300x173.png 300w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop-768x442.png 768w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop-1024x589.png 1024w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop-600x345.png 600w, http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/wp-content\/uploads\/2018\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_2018-05-05_15-00-40crop.png 1175w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>5.1.1 p141\u3042\u305f\u308a<\/strong><br \/>\n\u3053\u3053\u306f\u5148\u3068\u540c\u69d8\u306b websocket \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092 1.0.7 \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3060\u3051\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u5074\u3092\u8d77\u52d5\u3057\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u63a5\u7d9a\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.1.1$ node server.js \r\nWarning: Native modules not compiled.  XOR performance will be degraded.\r\nWarning: Native modules not compiled.  UTF-8 validation disabled.\r\n\"Hello\" \u3092 http:\/\/localhost:8080 \u304b\u3089\u53d7\u4fe1\r\n\u63a5\u7d9a\u89e3\u9664\uff1a1006 - Connection dropped by remote peer.\r\n<\/code><\/pre>\n<p>\u3053\u3061\u3089\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u8868\u793a\u3067\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.1.1$ node client.js \r\nWarning: Native modules not compiled.  XOR performance will be degraded.\r\nWarning: Native modules not compiled.  UTF-8 validation disabled.\r\n\u9001\u4fe1\uff1aHello\r\n\u53d7\u4fe1\uff1aWebSocket\u30b5\u30fc\u30d0\u304b\u3089\u3053\u3093\u306b\u3061\u306f\uff01\r\n<\/code><\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u7d42\u4e86\u306f\u3057\u307e\u305b\u3093\u3002<\/p>\n<p><strong>5.2 p142 \u3042\u305f\u308a<\/strong><br \/>\nsocket.io \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092 2.1.0 \u3068\u3057\u307e\u3057\u305f\u3002\u4e0b\u8a18\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306e\u753b\u9762\u3067\u3059\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.2$ npm install socket.io\r\n5.2@1.0.0 \/home\/friend\/scripts\/5\/5.2\r\n\u2514\u2500\u252c socket.io@2.1.0 \r\n  \u251c\u2500\u252c debug@3.1.0 \r\n  \u2502 \u2514\u2500\u2500 ms@2.0.0 \r\n  \u251c\u2500\u252c engine.io@3.2.0 \r\n  \u2502 \u251c\u2500\u252c accepts@1.3.5 \r\n  \u2502 \u2502 \u251c\u2500\u252c mime-types@2.1.18 \r\n  \u2502 \u2502 \u2502 \u2514\u2500\u2500 mime-db@1.33.0 \r\n  \u2502 \u2502 \u2514\u2500\u2500 negotiator@0.6.1 \r\n  \u2502 \u251c\u2500\u2500 base64id@1.0.0 \r\n  \u2502 \u251c\u2500\u2500 cookie@0.3.1 \r\n  \u2502 \u251c\u2500\u252c engine.io-parser@2.1.2 \r\n  \u2502 \u2502 \u251c\u2500\u2500 after@0.8.2 \r\n  \u2502 \u2502 \u251c\u2500\u2500 arraybuffer.slice@0.0.7 \r\n  \u2502 \u2502 \u2514\u2500\u2500 blob@0.0.4 \r\n  \u2502 \u2514\u2500\u252c ws@3.3.3 \r\n  \u2502   \u251c\u2500\u2500 async-limiter@1.0.0 \r\n  \u2502   \u251c\u2500\u2500 safe-buffer@5.1.2 \r\n  \u2502   \u2514\u2500\u2500 ultron@1.1.1 \r\n  \u251c\u2500\u252c has-binary2@1.0.2 \r\n  \u2502 \u2514\u2500\u2500 isarray@2.0.1 \r\n  \u251c\u2500\u2500 socket.io-adapter@1.1.1 \r\n  \u251c\u2500\u252c socket.io-client@2.1.0 \r\n  \u2502 \u251c\u2500\u2500 backo2@1.0.2 \r\n  \u2502 \u251c\u2500\u2500 base64-arraybuffer@0.1.5 \r\n  \u2502 \u251c\u2500\u2500 component-bind@1.0.0 \r\n  \u2502 \u251c\u2500\u2500 component-emitter@1.2.1 \r\n  \u2502 \u251c\u2500\u252c engine.io-client@3.2.1 \r\n  \u2502 \u2502 \u251c\u2500\u2500 component-inherit@0.0.3 \r\n  \u2502 \u2502 \u251c\u2500\u2500 xmlhttprequest-ssl@1.5.5 \r\n  \u2502 \u2502 \u2514\u2500\u2500 yeast@0.1.2 \r\n  \u2502 \u251c\u2500\u2500 has-cors@1.1.0 \r\n  \u2502 \u251c\u2500\u2500 indexof@0.0.1 \r\n  \u2502 \u251c\u2500\u2500 object-component@0.0.3 \r\n  \u2502 \u251c\u2500\u252c parseqs@0.0.5 \r\n  \u2502 \u2502 \u2514\u2500\u252c better-assert@1.0.2 \r\n  \u2502 \u2502   \u2514\u2500\u2500 callsite@1.0.0 \r\n  \u2502 \u251c\u2500\u2500 parseuri@0.0.5 \r\n  \u2502 \u2514\u2500\u2500 to-array@0.1.4 \r\n  \u2514\u2500\u2500 socket.io-parser@3.2.0 \r\n\r\nnpm WARN 5.2@1.0.0 No description\r\nnpm WARN 5.2@1.0.0 No repository field.\r\n<\/code><\/pre>\n<p>\u305d\u3046\u3059\u308b\u3068\u3001\u7279\u306b\u4f55\u3082\u305b\u305a\u306b\u52d5\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><strong>5.3.1 p151\u3042\u305f\u308a<\/strong><br \/>\nnow \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.3.1$ npm install now\r\n\r\n> now@11.1.7 postinstall \/home\/friend\/scripts\/5\/5.3.1\/node_modules\/now\r\n> node download\/install.js\r\n\r\n> For the source code, check out: https:\/\/github.com\/zeit\/now-cli\r\n\r\n> Downloading Now CLI 11.1.7 [====================] 100%\r\n\r\n5.3.1@1.0.0 \/home\/friend\/scripts\/5\/5.3.1\r\n\u2514\u2500\u2500 now@11.1.7 \r\n\r\nnpm WARN 5.3.1@1.0.0 No description\r\nnpm WARN 5.3.1@1.0.0 No repository field.\r\n<\/code><\/pre>\n<p>\u5b9f\u884c\u3057\u3066\u3082\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3057\u306a\u3044\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u4e0a\u624b\u304f\u3044\u3063\u3066\u3044\u306a\u3044\u306e\u304b\uff1f<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.3.1$ node server.js \r\nmodule.js:471\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'now'\r\n    at Function.Module._resolveFilename (module.js:469:15)\r\n    at Function.Module._load (module.js:417:25)\r\n    at Module.require (module.js:497:17)\r\n    at require (internal\/module.js:20:19)\r\n    at Object.<anonymous> (\/home\/friend\/scripts\/5\/5.3.1\/server.js:8:31)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n<\/code><\/pre>\n<p><a href=\"https:\/\/ja.stackoverflow.com\/questions\/36168\/node-js%E3%81%AEnowjs%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6\">\u3053\u3053\u306b<\/a>\u5c11\u3057\u60c5\u5831\u3042\u308a\u3002\u73fe\u5728\u306e now \u306f\u5225\u7269\u3060\u3068\u3042\u308b\u3002\u3053\u3053\u3067\u6b62\u3081\u308b\u3002<\/p>\n<p><strong>5.4 p153 \u3042\u305f\u308a<\/strong><br \/>\nwidget-server.js \u304c\u8d77\u52d5\u3057\u306a\u3044\u3002<\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\">friend@xpython:~\/scripts\/5\/5.4$ node widget_server.js \r\n\/home\/friend\/scripts\/5\/5.4\/widget_server.js:8\r\nio.configure(function () {\r\n   ^\r\n\r\nTypeError: io.configure is not a function\r\n    at Object.<anonymous> (\/home\/friend\/scripts\/5\/5.4\/widget_server.js:8:4)\r\n    at Module._compile (module.js:570:32)\r\n    at Object.Module._extensions..js (module.js:579:10)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n    at Module.runMain (module.js:604:10)\r\n    at run (bootstrap_node.js:394:7)\r\n    at startup (bootstrap_node.js:149:9)\r\n    at bootstrap_node.js:509:3\r\n<\/code><\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u52d5\u3044\u3066\u304f\u308c\u306a\u3044\u3068\u5185\u5bb9\u304c\u3055\u3063\u3071\u308a\u7406\u89e3\u3067\u304d\u306a\u3044\u3002<\/p>\n<p><strong>\u3042\u305f\u308a<\/strong><\/p>\n<pre><code style=\"color:midnightblue; font-size:12px;\"><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Node\u30af\u30c3\u30af\u30d6\u30c3\u30af\u3092\u8aad\u3093\u3067\u3044\u307e\u3059\u3002\u672c\u304c\u66f8\u304b\u308c\u305f\u3068\u304d\u3068\u306f\uff0c\u30e2\u30b8\u30e5\u30fc\u30eb\u7b49\u306e\u30d0\u30fc\u30b8\u30e7 &#8230; <a class=\"more-link\" href=\"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=6701\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-6701","post","type-post","status-publish","format-standard","hentry","category-column"],"_links":{"self":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6701"}],"version-history":[{"count":87,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6701\/revisions"}],"predecessor-version":[{"id":6804,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6701\/revisions\/6804"}],"wp:attachment":[{"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6701"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}