{"id":82316,"date":"2021-07-01T08:09:12","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=82316"},"modified":"2024-05-06T11:53:45","modified_gmt":"2024-05-06T02:53:45","slug":"%e3%80%90node-js%e5%85%a5%e9%96%80%e3%80%91%e8%aa%b0%e3%81%a7%e3%82%82%e5%88%86%e3%81%8b%e3%82%8bsocket-io%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%a8%e3%83%81%e3%83%a3%e3%83%83%e3%83%88%e3%82%a2","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/82316","title":{"rendered":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u3001WebSocket\u306b\u3088\u308b\u53cc\u65b9\u5411\u901a\u4fe1\u3092\u7c21\u5358\u306b\u8a18\u8ff0\u3067\u304d\u308b<span style=\"color: #54a870;\"><strong>\u300cSocket.io\u300d<\/strong><\/span>\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u7c21\u5358\u306a\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3067\u3092\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><span style=\"color: #f75959;\"><strong>\u300cSocket.io\u3063\u3066\u4f55\uff1f\u3069\u3046\u3084\u3063\u3066\u4f7f\u3046\u306e\uff1f\u300d<br \/>\n\u300c\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u81ea\u4f5c\u3057\u305f\u3044\u300d<br \/>\n\u300c\u53cc\u65b9\u5411\u901a\u4fe1\u306b\u3088\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u53d7\u4fe1\u65b9\u6cd5\u304c\u77e5\u308a\u305f\u3044\u300d<\/strong><\/span><\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u5185\u5bb9\u3082\u542b\u3081\u3066\u3001\u672c\u8a18\u4e8b\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u69cb\u6210\u3067\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\uff01<\/p>\n<div style=\"padding: 10px 5px 10px 20px; margin-bottom: 20px; border: 5px solid #ffe4e2;\">\n\u3010\u57fa\u790e\u3011\u300cSocket.io\u300d\u3068\u306f\uff1f<br \/>\n\u3010\u57fa\u790e\u3011\u300cSocket.io\u300d\u306e\u4f7f\u3044\u65b9<br \/>\n\u3010\u5b9f\u8df5\u3011Socket.io\u306b\u3088\u308b\u30d5\u30ed\u30f3\u30c8\u30b5\u30a4\u30c9<br \/>\n\u3010\u5b9f\u8df5\u3011Socket.io\u306b\u3088\u308b\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\n<\/div>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u3001Socket.io\u3092\u3057\u3063\u304b\u308a\u5b66\u7fd2\u3057\u3066\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3092\u76ee\u6307\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2>\u300cSocket.io\u300d\u3068\u306f\uff1f<\/h2>\n<p>\u307e\u305a\u306f\u3001\u300cSocket.io\u300d\u306e\u6982\u8981\u304b\u3089\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>Socket.io\u306f<span style=\"color: #f75959;\"><strong>WebSocket\u6280\u8853\u306b\u3088\u308b\u30c7\u30fc\u30bf\u306e\u53cc\u65b9\u5411\u901a\u4fe1\u3092\u5f37\u529b\u306b\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u30b5\u30fc\u30d3\u30b9<\/strong><\/span>\u3068\u3057\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u3001Socket.io\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082WebSocket\u306b\u3088\u308b\u53cc\u65b9\u5411\u901a\u4fe1\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u53ef\u80fd\u306a\u306e\u3067\u3059\u304c\u3001<span style=\"color: #254df2;\"><strong>\u30d6\u30e9\u30a6\u30b6\u306e\u7a2e\u985e\u3084\u30e6\u30fc\u30b6\u30fc\u306ePC\u74b0\u5883\u306a\u3069\u306b\u3088\u3063\u3066<\/strong><\/span>\u63a5\u7d9a\u3055\u308c\u306a\u3044\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u3059\u3002<\/p>\n<p>\u203bSocket.io\u3092\u4f7f\u308f\u306a\u3044WebSocket\u306b\u3088\u308b\u53cc\u65b9\u5411\u901a\u4fe1\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3053\u3061\u3089<br \/>\nhttps:\/\/www.sejuku.net\/blog\/70583<\/p>\n<p>\u3053\u308c\u3092\u5b89\u5b9a\u3055\u305b\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u6df1\u3044\u77e5\u8b58\u3068\u7d4c\u9a13\u304c\u5fc5\u8981\u3068\u306a\u308a\u521d\u5fc3\u8005\u306f\u9014\u65b9\u306b\u66ae\u308c\u3066\u3057\u307e\u3046\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3092\u60f3\u5b9a\u3057\u3066<span style=\"color: #254df2;\"><strong>\u5b89\u5b9a\u304b\u3064\u7c21\u6f54\u306b\u53cc\u65b9\u5411\u901a\u4fe1\u3092\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u304d\u308b\u3088\u3046\u306b\u516c\u958b\u3055\u308c\u3066\u3044\u308b<\/strong><\/span>\u306e\u304c\u3001\u4eca\u56de\u5b66\u7fd2\u3059\u308b\u300cSocket.io\u300d\u306a\u306e\u3067\u3059\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u74b0\u5883\u306b\u5408\u308f\u305b\u305f\u5b89\u5b9a\u63a5\u7d9a\u306e\u305f\u3081\u306e\u9ad8\u5ea6\u306a\u51e6\u7406\u306f\u3059\u3079\u3066<span style=\"color: #54a870;\"><strong>Socket.io<\/strong><\/span>\u306b\u307e\u304b\u305b\u308b\u3053\u3068\u3067\u3001\u6211\u3005\u306f\u4f5c\u308a\u305f\u3044\u3082\u306e\u306b\u96c6\u4e2d\u3067\u304d\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<h2>\u300cSocket.io\u300d\u306e\u4f7f\u3044\u65b9<\/h2>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001\u300cSocket.io\u300d\u306e\u57fa\u672c\u7684\u306a\u5c0e\u5165\u3084\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4e3b\u306b\u3001Socket.io\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u3068\u6700\u5c0f\u9650\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u3092\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<h3>Socket.io\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u6e96\u5099<\/h3>\n<p>\u307e\u305a\u306f\u3001Socket.io\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b<span style=\"color: #254df2;\"><strong>Node.js\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8<\/strong><\/span>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u3081\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u81ea\u4f53\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3001npm\u304b\u3089<span style=\"color: #f75959;\"><strong>install\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u5c0e\u5165\u306f\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nnpm install --save socket.io\r\n<\/pre>\n<p>\u3042\u3068\u306f\u3001require()\u3067Node.js\u304b\u3089\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u3059\u304c\u3001\u30dd\u30a4\u30f3\u30c8\u306f<span style=\"color: #54a870;\"><strong>\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar io = require('socket.io')(\u3010\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3011);\r\n<\/pre>\n<p>\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u7c21\u5358\u306b\u8a00\u3046\u3068<span style=\"color: #254df2;\"><strong>Node.js\u3067\u69cb\u7bc9\u3055\u308c\u305f\u30b5\u30fc\u30d0\u30fc<\/strong><\/span>\u306e\u3053\u3068\u306a\u306e\u3067\u3059\u304c\u3001\u4e00\u822c\u7684\u306b\u306fhttp\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3046\u65b9\u6cd5\u3068Express\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f\u6b21\u306e\u7ae0\u304b\u3089\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h3>http\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3088\u308b\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u65b9\u6cd5<\/h3>\n<p>\u307e\u305a\u306f\u3001\u6700\u3082\u57fa\u672c\u3068\u306a\u308b<span style=\"color: #54a870;\"><strong>http\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong><\/span>\u3092\u5229\u7528\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u7bc9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4eca\u56de\u306f\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3067\u5229\u7528\u3059\u308b<span style=\"color: #254df2;\"><strong>\u300cindex.html\u300d<\/strong><\/span>\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u30b5\u30fc\u30d0\u30fc\u306b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar http = require('http').createServer(handler);\r\nvar html = require('fs').readFileSync('views\/index.html');\r\n\r\nfunction handler(request, response) {\r\n  response.writeHead(200, {'Content-Type': 'text\/html'});\r\n  response.end(html);\r\n}\r\n\r\nhttp.listen(3000);\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<span style=\"color: #54a870;\"><strong>createServer()\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u306e\u5f15\u6570\u306bindex.html\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b\u95a2\u6570\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p><span style=\"color: #254df2;\"><strong>readFileSync()<\/strong><\/span>\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u3092<span style=\"color: #54a870;\"><strong>\u300chandler()\u300d\u95a2\u6570<\/strong><\/span>\u3092\u7d4c\u7531\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u306b\u51fa\u529b\u3059\u308b\u3068\u3044\u3046\u6d41\u308c\u3067\u3059\u3002<\/p>\n<p>http\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u65b9\u6cd5\u306b\u4e0d\u5b89\u304c\u3042\u308b\u65b9\u306f\u3001\u6b21\u306e\u8a18\u4e8b\u3067\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u3092\u307e\u3068\u3081\u3066\u3044\u308b\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/72566\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Node.js\u5165\u9580\u3011http\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3001GET\u30fbPOST\u901a\u4fe1\u65b9\u6cd5<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<p>\u307e\u305f\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u69cb\u7bc9\u3067\u304d\u305f\u3089Socket.io\u306e\u5f15\u6570\u3078<span style=\"color: #54a870;\"><strong>\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar io = require('socket.io')(http);\r\n<\/pre>\n<h3>Express\u306b\u3088\u308b\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u7bc9\u65b9\u6cd5<\/h3>\n<p>\u6b21\u306b\u3001\u5b9a\u756a\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066\u3088\u304f\u4f7f\u308f\u308c\u308b<span style=\"color: #54a870;\"><strong>Express<\/strong><\/span>\u306b\u3088\u308b\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u306f\u3001Express\u3092Node.js\u304b\u3089\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306brequire()\u3092\u8a18\u8ff0\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar express = require('express');\r\nvar app = express();\r\n<\/pre>\n<p>\u305d\u3057\u3066\u3001createServer()\u306e\u5f15\u6570\u306b\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fExpress\u306e<span style=\"color: #54a870;\"><strong>\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar server = require('http').createServer(app);\r\n\r\napp.get(\"\/\", function (request, response) {\r\n  response.sendFile(__dirname + '\/views\/index.html');\r\n});\r\n\r\nserver.listen(3000);\r\n<\/pre>\n<p><span style=\"color: #254df2;\"><strong>get()\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u5185\u306bindex.html\u306e\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3092\u5b9f\u73fe\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u306d\u3002<\/p>\n<p>\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u901a\u5e38\u306eapp.listen()\u3067\u306f\u306a\u304f<span style=\"color: #f75959;\"><strong>server.listen()<\/strong><\/span>\u3092\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u70b9\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001Socket.io\u306e\u5f15\u6570\u306b\u3082<span style=\"color: #54a870;\"><strong>\u30b5\u30fc\u30d0\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar io = require('socket.io').listen(server);\r\n<\/pre>\n<p>Express\u3092\u5229\u7528\u3059\u308b\u3068\u8a18\u8ff0\u304c\u7c21\u6f54\u306b\u306a\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u306d\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001Express\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u4f53\u7cfb\u7684\u306b\u5b66\u3079\u308b\u3088\u3046\u306b\u6b21\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u308b\u306e\u3067\u5408\u308f\u305b\u3066\u5b66\u7fd2\u3057\u3066\u307f\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\uff01<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/74845\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Node.js\u5165\u9580\u3011\u521d\u5fc3\u8005\u306e\u305f\u3081\u306eExpress\u5165\u9580\uff08GET \/ POST\uff09<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h2>\u300cSocket.io\u300d\u306e\u30d5\u30ed\u30f3\u30c8\u30b5\u30a4\u30c9<\/h2>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001\u300cSocket.io\u300d\u3092\u5229\u7528\u3057\u305f\u30d5\u30ed\u30f3\u30c8\u30b5\u30a4\u30c9\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4e3b\u306b\u3001\u30c1\u30e3\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u8a2d\u7f6e\u3084\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u9001\u53d7\u4fe1\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30c1\u30e3\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u4f5c\u308a\u65b9<\/h3>\n<p>\u307e\u305a\u306f\u3001Web\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3055\u308c\u308b\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u753b\u9762\u304b\u3089\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4eca\u56de\u4f5c\u308b\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6700\u5c0f\u9650\u306e\u69cb\u6210\u3067\u69cb\u7bc9\u3055\u308c\u305f\u30b7\u30f3\u30d7\u30eb\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2021\/07\/node-socket-io-1.jpg\" alt=\"\" width=\"800\" height=\"400\" class=\"alignnone size-full wp-image-83351\" \/><br \/>\n\u3053\u306e\u753b\u9762\u3092\u4f5c\u308b\u305f\u3081\u306b\u3001\u307e\u305a\u306f\u6700\u4f4e\u9650\u306e\u753b\u9762\u30c7\u30b6\u30a4\u30f3\u3092\u69cb\u7bc9\u3067\u304d\u308b<span style=\"color: #54a870;\"><strong>\u300cMilligram.css\u300d<\/strong><\/span>\u3092\u5c0e\u5165\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\n<link rel=\"stylesheet\" href=\"\/\/cdn.rawgit.com\/milligram\/milligram\/master\/dist\/milligram.min.css\">\r\n<\/pre>\n<p>Milligram.css\u306f\u7279\u306b\u30af\u30e9\u30b9\u540d\u306a\u3069\u3092\u4ed8\u4e0e\u3057\u306a\u304f\u3066\u3082\u3001\u4e00\u822c\u7684\u306aHTML\u30bf\u30b0\u3092\u305d\u306e\u307e\u307e\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u898b\u305f\u76ee\u306e\u826f\u3044\u30c7\u30b6\u30a4\u30f3\u306b\u5909\u3048\u3066\u304f\u308c\u308b\u30b9\u30b0\u30ec\u30e2\u30ce\u3067\u3059\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001HTML\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\n<div class=\"container\">\r\n\r\n    <form name=\"myform\">\r\n        <input name=\"text\" type=\"text\">\r\n        <button name=\"btn\">\u9001\u4fe1<\/button>\r\n    <\/form>\r\n\r\n    <hr>\r\n\r\n    <ul id=\"message\"><\/ul>\r\n\r\n<\/div>\r\n<\/pre>\n<p>\u300cform\u300d\u306e\u4e2d\u8eab\u306f\u5358\u7d14\u306a\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3068\u30dc\u30bf\u30f3\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u4e0b\u6bb5\u306b\u306f<span style=\"color: #254df2;\"><strong>\u300cul\u30bf\u30b0\u300d<\/strong><\/span>\u3067\u30c1\u30e3\u30c3\u30c8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u3059\u3079\u3066\u4e00\u89a7\u3067\u51fa\u529b\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u30d5\u30ed\u30f3\u30c8\u5074\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u3078\u4efb\u610f\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u6700\u521d\u306b\u30d5\u30ed\u30f3\u30c8\u5074\u3067Socket.io\u304c\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3001\u6b21\u306e\u3088\u3046\u306bJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/socket.io\/2.1.1\/socket.io.js\"><\/script>\r\n<\/pre>\n<p>\u305d\u306e\u3042\u3068\u306b\u3001<span style=\"color: #254df2;\"><strong>\u300cio()\u300d<\/strong><\/span>\u3092\u4efb\u610f\u306e\u5909\u6570\u3078\u683c\u7d0d\u3059\u308b\u3053\u3068\u3067Socket.io\u304c\u63d0\u4f9b\u3059\u308b\u3055\u307e\u3056\u307e\u306aAPI\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nvar socket = io();\r\nvar message = document.getElementById('message');\r\nvar form = document.forms.myform;\r\n<\/pre>\n<p>\u3064\u3044\u3067\u306b\u3001ul\u30bf\u30b0\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u306b\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u306e\u3068\u3001\u30d5\u30a9\u30fc\u30e0\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u8a18\u8ff0\u3082\u4e0a\u8a18\u306e\u3068\u304a\u308a\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306b\u8a18\u8ff0\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u3078\u9001\u4fe1\u3059\u308b\u51e6\u7406\u3092\u4f5c\u308c\u3070\u826f\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u5834\u5408\u306f<span style=\"color: #254df2;\"><strong>\u300cemit()\u300d\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3092\u6b21\u306e\u3088\u3046\u306b\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nform.btn.addEventListener('click', function(e) {\r\n    e.preventDefault();\r\n\r\n    socket.emit('chat', form.text.value);\r\n    form.text.value = '';\r\n})\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067emit()\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30dd\u30a4\u30f3\u30c8\u306femit()\u306e\u7b2c1\u5f15\u6570\u306e<span style=\"color: #f75959;\"><strong>\u300cchat\u300d<\/strong><\/span>\u3068\u3044\u3046\u6587\u5b57\u5217\u3067\u3001\u3053\u308c\u306f\u4f55\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c<span style=\"color: #f75959;\"><strong>\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u51e6\u7406\u3082\u540c\u3058\u6587\u5b57\u5217\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u306f\u3001\u540c\u3058\u6587\u5b57\u5217\u3092\u30d5\u30ed\u30f3\u30c8\u30fb\u30b5\u30fc\u30d0\u30fc\u4e21\u65b9\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u540c\u3058\u7a7a\u9593\u3092\u5171\u6709\u3059\u308b\u3088\u3046\u306a\u30cb\u30e5\u30a2\u30f3\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001<span style=\"color: #254df2;\"><strong>\u300ce.preventDefault()\u300d<\/strong><\/span>\u306f\u30d5\u30a9\u30fc\u30e0\u306e\u753b\u9762\u66f4\u65b0\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u51e6\u7406\u3067\u3001<span style=\"color: #254df2;\"><strong>\u300cform.text.value=&#8221;\u300d<\/strong><\/span>\u306f\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u7a7a\u3063\u307d\u306b\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n<h3>\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u3066\u8868\u793a\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u30d5\u30ed\u30f3\u30c8\u5074\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b5\u30fc\u30d0\u30fc\u3078\u9001\u4fe1\u3059\u308b\u3068\u3001\u4eca\u5ea6\u306f<span style=\"color: #f75959;\"><strong>\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u5168\u30e6\u30fc\u30b6\u30fc\u306b\u5411\u3051\u3066\u9001\u3089\u308c\u3066\u304d\u305f\u6587\u5b57\u5217\u3092\u914d\u4fe1\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u540c\u3058\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5171\u6709\u3057\u3066\u95b2\u89a7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u9001\u4fe1\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u306e\u753b\u9762\u306b\u8868\u793a\u3059\u308b\u51e6\u7406\u3092\u4f5c\u3089\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u306b\u306f<span style=\"color: #254df2;\"><strong>on()\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3092\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nsocket.on('chat', function(msg){\r\n\r\n    \/\/\u3053\u3053\u306b\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\r\n\r\n});\r\n<\/pre>\n<p>\u7b2c1\u5f15\u6570\u306b\u306f\u4eca\u56de\u5229\u7528\u3057\u3066\u3044\u308b<span style=\"color: #f75959;\"><strong>\u300cchat\u300d<\/strong><\/span>\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u4f7f\u3044\u3001\u7b2c2\u5f15\u6570\u306b\u5b9f\u884c\u3057\u305f\u3044\u95a2\u6570\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u95a2\u6570\u306e\u5f15\u6570<span style=\"color: #54a870;\"><strong>\u300cmsg\u300d<\/strong><\/span>\u306b\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u9001\u3089\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\uff08\u6587\u5b57\u5217\uff09\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308c\u3070\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u753b\u9762\u306b\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306d\uff01<\/p>\n<pre class=\"lang:js decode:true\">\r\nsocket.on('chat', function(msg){\r\n    var li = document.createElement('li');\r\n\r\n    li.textContent = msg;\r\n    message.appendChild(li);\r\n});\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001li\u8981\u7d20\u3092\u4f5c\u6210\u3057\u3066\u305d\u3053\u306b\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d6\u5f97\u3057\u305f\u6587\u5b57\u5217\u3092\u7d44\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #54a870;\"><strong>appendChild()<\/strong><\/span>\u3067ul\u30bf\u30b0\u306e\u4e2d\u306b\u914d\u7f6e\u3059\u308b\u3053\u3068\u3067\u3001\u6b21\u3005\u3068\u30c1\u30e3\u30c3\u30c8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u4e00\u89a7\u8868\u793a\u3067\u95b2\u89a7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<h2>\u300cSocket.io\u300d\u306e\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9<\/h2>\n<p>\u3053\u306e\u7ae0\u3067\u306f\u3001\u300cSocket.io\u300d\u3092\u5229\u7528\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u51e6\u7406\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u4e3b\u306b\u3001\u30d5\u30ed\u30f3\u30c8\u304b\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u30fb\u914d\u4fe1\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u30fb\u914d\u4fe1\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u30d5\u30ed\u30f3\u30c8\u5074\u304b\u3089\u9001\u4fe1\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u51e6\u7406\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u6700\u521d\u306b<span style=\"color: #254df2;\"><strong>on()\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3092\u4f7f\u3063\u3066\u30d5\u30ed\u30f3\u30c8\u5074\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nio.on('connection', function(socket){\r\n\r\n    \/\/\u3053\u3053\u306b\u51e6\u7406\u3092\u8a18\u8ff0\u3059\u308b\r\n\r\n});\r\n<\/pre>\n<p>\u7b2c1\u5f15\u6570\u306b<span style=\"color: #f75959;\"><strong>\u300cconnection\u300d<\/strong><\/span>\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u7b2c2\u5f15\u6570\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u95a2\u6570\u306e\u5f15\u6570<span style=\"color: #54a870;\"><strong>\u300csocket\u300d<\/strong><\/span>\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3082\u542b\u3081\u3066\u9001\u4fe1\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u3053\u306esocket\u3092\u4f7f\u3063\u3066<span style=\"color: #254df2;\"><strong>on()\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3092\u6b21\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:js decode:true\">\r\nio.on('connection', function(socket){\r\n\r\n    socket.on('chat', function(msg){\r\n        console.log(msg);\r\n    });\r\n\r\n});\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u7b2c1\u5f15\u6570\u306b\u30d5\u30ed\u30f3\u30c8\u5074\u3068\u540c\u3058\u6587\u5b57\u5217<span style=\"color: #f75959;\"><strong>\u300cchat\u300d<\/strong><\/span>\u3092\u8a2d\u5b9a\u3057\u3001\u7b2c2\u5f15\u6570\u306e\u95a2\u6570\u5185\u3067\u53d6\u5f97\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u30d5\u30ed\u30f3\u30c8\u5074\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u3001emit()\u3092\u6b21\u306e\u3088\u3046\u306b\u5b9f\u884c\u3059\u308c\u3070\u5168\u30e6\u30fc\u30b6\u30fc\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u914d\u4fe1\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nio.on('connection', function(socket){\r\n\r\n    socket.on('chat', function(msg){\r\n        io.emit('chat', msg);\r\n    });\r\n\r\n});\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u305f\u77ac\u9593\u306b\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u914d\u4fe1\u3055\u308c\u3066\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u8907\u6570\u4eba\u304c\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u5834\u5408\u306f<span style=\"color: #f75959;\"><strong>\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h2>\u30e6\u30fc\u30b6\u30fc\u3092\u5224\u5225\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066<\/h2>\n<p>\u3059\u3067\u306b\u3053\u306e\u6642\u70b9\u3067\u3001\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u57fa\u672c\u52d5\u4f5c\u306f\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u306a\u304c\u3089\u3001<span style=\"color: #f75959;\"><strong>\u8ab0\u304c\u3069\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u305f\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u72b6\u614b\u3067\u3059\u3088\u306d\uff1f<\/strong><\/span><\/p>\n<p>\u305d\u3053\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u5224\u5225\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6a2a\u306b\u8ab0\u304c\u9001\u4fe1\u3057\u305f\u306e\u304b\u5206\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b<span style=\"color: #254df2;\"><strong>\u300c\u30e6\u30fc\u30b6\u30fc\u540d\u300d<\/strong><\/span>\u3082\u4e00\u7dd2\u306b\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u6539\u9020\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u306f\u3001\u30d5\u30ed\u30f3\u30c8\u5074\u3067\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u969b\u306b<span style=\"color: #f75959;\"><strong>\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5165\u529b\u3059\u308b\u753b\u9762<\/strong><\/span>\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nsocket.on('connect', function(){\r\n  socket.emit('setUserName', prompt('\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044'));\r\n});\r\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<span style=\"color: #f75959;\"><strong>\u300cconnect\u300d\u30a4\u30d9\u30f3\u30c8<\/strong><\/span>\u5185\u3067prompt()\u3092\u4f7f\u3063\u3066\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5165\u529b\u3059\u308b\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2021\/07\/node-socket-io-2.jpg\" alt=\"\" width=\"800\" height=\"400\" class=\"alignnone size-full wp-image-83352\" \/><br \/>\n\u3053\u308c\u306b\u3088\u308a\u3001emit()\u3092\u4f7f\u3063\u3066<span style=\"color: #254df2;\"><strong>\u300csetUserName\u300d<\/strong><\/span>\u3068\u3044\u3046\u7a7a\u9593\u3067\u5165\u529b\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u30b5\u30fc\u30d0\u30fc\u3078\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u51e6\u7406\u3068\u3057\u3066\u306f\u9001\u4fe1\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u53d6\u5f97\u3057\u3066\u3001\u5404\u30e6\u30fc\u30b6\u30fc\u3092\u5224\u5225\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\uff08\u203bio.on()\u306e\u300cconnection\u300d\u5185\u306b\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u8a18\u3057\u307e\u3059\uff09<\/p>\n<pre class=\"lang:js decode:true\">\r\nsocket.on('setUserName', function (userName) {\r\n    if(!userName) userName = '\u533f\u540d';\r\n\r\n    socket.userName = userName;\r\n});\r\n<\/pre>\n<p>on()\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066<span style=\"color: #f75959;\"><strong>\u300csockeet.userName\u300d<\/strong><\/span>\u3068\u3044\u3046\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f5c\u308a\u3001\u305d\u3053\u3078\u53d6\u5f97\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u5f53\u3066\u306f\u3081\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u7d44\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067\u3001\u7c21\u5358\u306b\u5224\u5225\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u304c\u4f55\u3082\u5165\u529b\u3055\u308c\u306a\u304b\u3063\u305f\u6642\u3092\u8003\u616e\u3057\u3066\u3001<span style=\"color: #254df2;\"><strong>\u300cif(!userName)\u300d<\/strong><\/span>\u3067\u5206\u5c90\u51e6\u7406\u3092\u4f5c\u308a\u300c\u533f\u540d\u300d\u3092\u5f53\u3066\u306f\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u914d\u4fe1\u3059\u308b\u969b\u306b<span style=\"color: #f75959;\"><strong>\u300csocket.userName\u300d<\/strong><\/span>\u3092\u4e00\u7dd2\u306b\u9001\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\">\r\nsocket.on('chat', function(msg){\r\n    io.emit('chat', socket.userName + ': ' + msg);\r\n});\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u8ab0\u304c\u3069\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u305f\u306e\u304b\u5206\u304b\u308a\u3084\u3059\u304f\u306a\u308a\u307e\u3057\u305f\u306d\uff01<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2021\/07\/node-socket-io-3.jpg\" alt=\"\" width=\"800\" height=\"400\" class=\"alignnone size-full wp-image-83353\" \/><br \/>\n\u3053\u306e\u3088\u3046\u306bSocket.io\u3092\u4f7f\u3046\u3068\u3001\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u8a18\u8ff0\u3067\u7c21\u5358\u306a\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u304c\u4f5c\u308c\u308b\u308f\u3051\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001Socket.io\u306e\u4f7f\u3044\u65b9\u3068\u7c21\u5358\u306a\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u307e\u3067\u3092\u5b66\u7fd2\u3057\u307e\u3057\u305f\uff01<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u3082\u3046\u4e00\u5ea6\u30dd\u30a4\u30f3\u30c8\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>\u30fbSocket.io\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u306fhttp\u30e2\u30b8\u30e5\u30fc\u30eb\u304bExpress\u3092\u4f7f\u3046<br \/>\n\u30fb\u30d5\u30ed\u30f3\u30c8\u5074\u3067\u306f\u5c02\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u307femit()\u3092\u4f7f\u3063\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b<br \/>\n\u30fb\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u306fon()\u3067\u30d5\u30ed\u30f3\u30c8\u5074\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u51e6\u7406\u3092\u884c\u3046<\/strong><\/p>\n<p>\u4e0a\u8a18\u5185\u5bb9\u3092\u8e0f\u307e\u3048\u3066\u3001\u305c\u3072\u81ea\u5206\u3067\u3082\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u53d6\u308a\u5165\u308c\u3066\u6d3b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u9811\u5f35\u308a\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001WebSocket\u306b\u3088\u308b\u53cc\u65b9\u5411\u901a\u4fe1\u3092\u7c21\u5358\u306b\u8a18\u8ff0\u3067\u304d\u308b\u300cSocket.io\u300d\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u7c21\u5358\u306a\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3067\u3092\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01 \u300cSocket.io\u3063\u3066\u4f55\uff1f\u3069\u3046\u3084\u3063\u3066\u4f7f\u3046\u306e\uff1f\u300d \u300c\u30c1\u30e3\u30c3\u30c8 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":71664,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2346],"tags":[1187,2108],"class_list":["post-82316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript-study","tag-node-js","tag-socket-io"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/82316\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/82316\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:53:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:53:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316\"},\"wordCount\":204,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/node-top.jpg\",\"keywords\":[\"Node.js\",\"socket io\"],\"articleSection\":[\"Javascript\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316\",\"name\":\"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/node-top.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:53:45+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/node-top.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/09\\\/node-top.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/82316#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/82316","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/82316","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2024-05-06T02:53:45+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/82316#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/82316"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:53:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/82316"},"wordCount":204,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/82316#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg","keywords":["Node.js","socket io"],"articleSection":["Javascript\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/82316","url":"https:\/\/www.sejuku.net\/blog\/82316","name":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/82316#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/82316#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:53:45+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/82316#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/82316"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/82316#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/09\/node-top.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/82316#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Node.js\u5165\u9580\u3011\u8ab0\u3067\u3082\u5206\u304b\u308bSocket.io\u306e\u4f7f\u3044\u65b9\u3068\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u306e\u4f5c\u308a\u65b9\u307e\u3068\u3081\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/82316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=82316"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/82316\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/71664"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=82316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=82316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=82316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}