{"id":941,"date":"2024-12-27T17:53:00","date_gmt":"2024-12-27T08:53:00","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/route\/941\/"},"modified":"2025-02-27T10:44:44","modified_gmt":"2025-02-27T01:44:44","slug":"941","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/941\/","title":{"rendered":"\u3010\u5fb9\u5e95\u89e3\u8aac\u3011Node.js\uff0bExpress\u3067\u4f5c\u308b\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\uff1a\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u30d6\u30e9\u30a6\u30b6\u3078\u306e\u8868\u793a\u307e\u3067"},"content":{"rendered":"<div>\n<p><strong>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u306e\u7b2c\u4e00\u6b69<\/strong><\/p>\n<p>\n    \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u3092\u59cb\u3081\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u300c\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u300d\u3068\u3044\u3046\u4f5c\u696d\u306f\u6700\u521d\u306b\u5b66\u3076\u3079\u304d\u57fa\u672c\u306e\u4e00\u3064\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u3063\u3066\u3069\u3046\u3084\u3063\u3066\u4f5c\u308b\u306e\u304b\u3001\u4f55\u3092\u4f7f\u3048\u3070\u3044\u3044\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u65b9\u3082\u591a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\u4eca\u56de\u306f\u3001JavaScript\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u5fc5\u8981\u306a\u306e\u304c\u300cNode.js\u300d\u3068\u3044\u3046\u30c4\u30fc\u30eb\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u4f5c\u6210\u3092\u7c21\u5358\u306b\u3057\u3066\u304f\u308c\u308b\u300cExpress\u300d\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<br \/>\u3053\u308c\u3092\u7406\u89e3\u3059\u308c\u3070\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306e\u7b2c\u4e00\u6b69\u304c\u8e0f\u307f\u51fa\u305b\u307e\u3059\u3088\uff01\n  <\/p>\n<p><strong>Node.js\u3068\u306f\uff1f<\/strong><\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/route-zero.com\/recruit\/wp-content\/uploads\/2025\/02\/941_1.jpg\" alt=\"Node.js\u3068\u306f\uff1f\" width=\"620\" height=\"310\" loading=\"lazy\" \/><\/figure>\n<p>\n    Node.js\u306f\u3001\u300cJavaScript\u300d\u3092\u4f7f\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u3092\u52d5\u304b\u3059\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002<br \/>\u901a\u5e38\u3001JavaScript\u306fWeb\u30da\u30fc\u30b8\u3092\u4f5c\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u307e\u3059\u304c\u3001Node.js\u3092\u4f7f\u3046\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u3067\u3082JavaScript\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3093\u3067\u3059\u3002<br \/>\u7c21\u5358\u306b\u8a00\u3046\u3068\u3001Node.js\u306f\u300cJavaScript\u3092\u30b5\u30fc\u30d0\u30fc\u3067\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u308b\u9b54\u6cd5\u306e\u30c4\u30fc\u30eb\u300d\u3067\u3059\u3002\n  <\/p>\n<p>\n    \u307e\u305f\u3001Node.js\u306f\u975e\u5e38\u306b\u300c\u901f\u3044\u300d\u3068\u8a00\u308f\u308c\u3066\u3044\u3066\u3001\u305f\u304f\u3055\u3093\u306e\u30ea\u30af\u30a8\u30b9\u30c8\uff08\u30a2\u30af\u30bb\u30b9\uff09\u3092\u4e00\u5ea6\u306b\u3055\u3070\u304f\u306e\u304c\u5f97\u610f\u3067\u3059\u3002<br \/>\u3053\u308c\u304c\u3001\u4f8b\u3048\u3070\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u3084\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30b2\u30fc\u30e0\u306a\u3069\u3001\u3059\u3070\u3084\u304f\u53cd\u5fdc\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3074\u3063\u305f\u308a\u306a\u7406\u7531\u3067\u3059\u3002\n  <\/p>\n<p><strong>Node.js\u306e\u5c0e\u5165\u65b9\u6cd5<\/strong><\/p>\n<p>\u305d\u308c\u3067\u306f\u3001Node.js\u3092\u5b9f\u969b\u306b\u81ea\u5206\u306e\u30d1\u30bd\u30b3\u30f3\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3068\u3066\u3082\u7c21\u5358\u3067\u3059\u3002<\/p>\n<p><strong>Node.js\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/strong><\/p>\n<p>\u307e\u305a\u306f\u3001Node.js\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/nodejs.org\/\">Node.js\u306e\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3002<\/p>\n<\/li>\n<li>\n<p>\u300cLTS\u30d0\u30fc\u30b8\u30e7\u30f3\uff08\u63a8\u5968\u7248\uff09\u300d\u3068\u3044\u3046\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u3001\u753b\u9762\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u30bf\u30fc\u30df\u30ca\u30eb\uff08\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u3092\u958b\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code>node -v<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Node.js\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002\u8868\u793a\u3055\u308c\u308c\u3070\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u6210\u529f\u3067\u3059\uff01<\/p>\n<p><strong>npm\uff08\u30a8\u30cc\u30d4\u30fc\u30a8\u30e0\uff09\u3092\u4f7f\u3046<\/strong><\/p>\n<p>\n    Node.js\u306b\u306f\u300cnpm\uff08\u30a8\u30cc\u30d4\u30fc\u30a8\u30e0\uff09\u300d\u3068\u3044\u3046\u4fbf\u5229\u306a\u30c4\u30fc\u30eb\u3082\u3064\u3044\u3066\u304d\u307e\u3059\u3002<br \/>npm\u306f\u3001JavaScript\u3067\u4f7f\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30c4\u30fc\u30eb\u3092\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<br \/>\u3053\u308c\u3092\u4f7f\u3063\u3066\u3001\u5f8c\u3067Express\u3082\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n  <\/p>\n<h3>Express\u3092\u4f7f\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u3088\u3046\uff01<\/h3>\n<p>\n    Node.js\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u3089\u3001\u6b21\u306b\u300cExpress\u300d\u3092\u4f7f\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u307e\u3059\u3002<br \/>Express\u306f\u3001Node.js\u3067\u7c21\u5358\u306bWeb\u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002<br \/>\u3053\u308c\u3092\u4f7f\u3046\u3068\u3001\u9762\u5012\u306a\u8a2d\u5b9a\u3084\u4f5c\u696d\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3064\u3064\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n  <\/p>\n<p>\u4ee5\u4e0b\u306f\u3001Express\u3092\u4f7f\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u624b\u9806\u3067\u3059\u3002<\/p>\n<p>\n    <strong>\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/strong><br \/>\n    <br \/>\u307e\u305a\u306f\u3001\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u3001\u305d\u306e\u4e2d\u3067\u4f5c\u696d\u3092\u59cb\u3081\u307e\u3059\u3002<br \/>\u30bf\u30fc\u30df\u30ca\u30eb\uff08\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\n  <\/p>\n<pre><code><span># \u65b0\u3057\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300cmy-express-app\u300d\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u4e2d\u306b\u79fb\u52d5<\/span>\r\n  mkdir script-app\r\n  cd script-app\r\n  \r\n  <span># \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff08package.json\uff09\u3092\u4f5c\u6210<\/span>\r\n  <span># \u300c-y\u300d\u3092\u3064\u3051\u308b\u3053\u3068\u3067\u3001\u3059\u3079\u3066\u306e\u8cea\u554f\u306b\u81ea\u52d5\u3067\u300c\u306f\u3044\u300d\u3068\u7b54\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/span>\r\n  npm init -y<\/code><\/pre>\n<p>\n    <strong>Express\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/><\/strong>\u6b21\u306b\u3001Express\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\u3053\u308c\u306b\u3088\u308a\u3001Express\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\n  <\/p>\n<pre><code><span># Express\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/span>\r\n  <span># \u300c--save\u300d\u3092\u3064\u3051\u308b\u3068\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u304cpackage.json\u306b\u8a18\u9332\u3055\u308c\u3001\u4f9d\u5b58\u95a2\u4fc2\u3068\u3057\u3066\u8ffd\u52a0\u3055\u308c\u307e\u3059<\/span>\r\n  npm install express --save<\/code><\/pre>\n<p><strong>\u30b5\u30fc\u30d0\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/strong><\/p>\n<p>\u6b21\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u300cindex.js\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><code><span>\/\/ Express\u3092\u4f7f\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8aad\u307f\u8fbc\u3080<\/span>\r\n  <span>const<\/span> express = <span>require<\/span>(<span>'express'<\/span>);\r\n  \r\n  <span>\/\/ Express\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210<\/span>\r\n  <span>const<\/span> app = express();\r\n  \r\n  <span>\/\/ \u30b5\u30fc\u30d0\u30fc\u304c\u52d5\u4f5c\u3059\u308b\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\uff083000\u756a\u30dd\u30fc\u30c8\uff09<\/span>\r\n  <span>const<\/span> port = <span>3000<\/span>;\r\n  \r\n  <span>\/\/ \u30eb\u30fc\u30c8\uff08\"\/\"\uff09\u306b\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u5834\u5408\u306b\u300cHello, Express!\u300d\u3092\u8fd4\u3059\u51e6\u7406<\/span>\r\n  app.get(<span>'\/'<\/span>, <span>(<span>req, res<\/span>) =&gt;<\/span> {\r\n    res.send(<span>'Hello, Express!'<\/span>);\r\n  });\r\n  \r\n  <span>\/\/ \u30b5\u30fc\u30d0\u30fc\u3092\u6307\u5b9a\u3057\u305f\u30dd\u30fc\u30c8\u3067\u7acb\u3061\u4e0a\u3052\u308b<\/span>\r\n  <span>\/\/ \u30b5\u30fc\u30d0\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u3063\u305f\u3053\u3068\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b<\/span>\r\n  app.listen(port, <span><span>()<\/span> =&gt;<\/span> {\r\n    <span>console<\/span>.log(<span>`Server is running at http:\/\/localhost:<span>${port}<\/span>`<\/span>);\r\n  });<\/code><\/pre>\n<p><strong>\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5<\/strong><\/p>\n<p>\u6700\u5f8c\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code><span># \u4f5c\u6210\u3057\u305f\u30b5\u30fc\u30d0\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5<\/span>\r\n  node index.js<\/code><\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067 http:\/\/localhost:3000 \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u300cHello, Express!\u300d\u3068\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001Node.js\u3068Express\u3092\u4f7f\u3063\u305f\u30b5\u30fc\u30d0\u30fc\u306e\u7acb\u3061\u4e0a\u3052\u304c\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h3>HTML\u3092\u8868\u793a\u3057\u3066\u307f\u3088\u3046\uff01<\/h3>\n<figure><img decoding=\"async\" src=\"https:\/\/route-zero.com\/recruit\/wp-content\/uploads\/2025\/02\/941_2.jpg\" alt=\"HTML\u3092\u8868\u793a\u3057\u3066\u307f\u3088\u3046\uff01\" width=\"620\" height=\"310\" loading=\"lazy\" \/><\/figure>\n<p>\n    \u3053\u308c\u307e\u3067\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u304c\u3001\u6b21\u306f\u5b9f\u969b\u306b<strong>\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb<\/strong>\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u306b\u9032\u3093\u3067\u3044\u304d\u307e\u3057\u3087\u3046\uff01\n  <\/p>\n<p>\n    \u524d\u56de\u306e\u8a18\u4e8b\u3067\u4f5c\u6210\u3057\u305f<a href=\"https:\/\/route-zero.com\/recruit\/route\/894\/\">\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb<\/a\n    >\u3092\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3063\u3066\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u5148\u7a0b\u7acb\u3061\u4e0a\u3052\u305f\u30b5\u30fc\u30d0\u30fc\u306b\u3001HTML\u30da\u30fc\u30b8\u3068\u3057\u3066\u305d\u306e\u30c4\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u3067\u3001<strong>\u9759\u7684\u306aHTML\u30da\u30fc\u30b8<\/strong>\u3068<strong>\u52d5\u7684\u306a\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb<\/strong>\u3092\u7c21\u5358\u306b\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n  <\/p>\n<h3>\u30d5\u30a9\u30eb\u30c0\u69cb\u6210<\/h3>\n<p>\u3053\u3053\u3067\u306f\u3001\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3092\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u69cb\u6210\u3092\u57fa\u306b\u3001\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u6574\u7406\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre><code>.\r\n  \u251c\u2500\u2500 <span>public<\/span>                   <span># \u9759\u7684\u30d5\u30a1\u30a4\u30eb\u3092\u683c\u7d0d\u3059\u308b\u30d5\u30a9\u30eb\u30c0<\/span>\r\n  \u2502   \u2514\u2500\u2500 index.html            <span># \u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u306eHTML\u30d5\u30a1\u30a4\u30eb<\/span>\r\n  \u251c\u2500\u2500 index.js                  <span># Express\u30b5\u30fc\u30d0\u30fc\u306e\u30e1\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb<\/span>\r\n  \u251c\u2500\u2500 package-<span>lock<\/span>.json         <span># npm\u306e\u4f9d\u5b58\u95a2\u4fc2\u306e\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb<\/span>\r\n  \u2514\u2500\u2500 package.json              <span># \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u3068\u4f9d\u5b58\u95a2\u4fc2\u3092\u8a18\u8f09\u3057\u305f\u30d5\u30a1\u30a4\u30eb<\/span><\/code><\/pre>\n<ul>\n<li>\n<p>\n        <strong>public \u30d5\u30a9\u30eb\u30c0<\/strong>: \u9759\u7684\u306a\u30d5\u30a1\u30a4\u30eb\uff08\u3053\u3053\u3067\u306f<br \/>\n        index.html\uff09\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u308bHTML\u30d5\u30a1\u30a4\u30eb\u3084CSS\u3001JavaScript\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3092\u3053\u3053\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\n      <\/p>\n<\/li>\n<li>\n<p><strong>index.js \u30d5\u30a1\u30a4\u30eb<\/strong>: Express\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u3001public \u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306e index.html \u3092\u30d6\u30e9\u30a6\u30b6\u306b\u8fd4\u3059\u5f79\u5272\u3092\u62c5\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\n        <strong>package.json \u3068 package-lock.json<\/strong>: \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f9d\u5b58\u95a2\u4fc2\u3084\u8a2d\u5b9a\u3092\u7ba1\u7406\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002npm install<br \/>\n        \u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4f9d\u5b58\u95a2\u4fc2\u304c\u3053\u3053\u306b\u8a18\u8f09\u3055\u308c\u307e\u3059\u3002\n      <\/p>\n<\/li>\n<\/ul>\n<p>\n    \u3053\u306e\u3088\u3046\u306b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u6210\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u5f8c\u306e\u4f5c\u696d\u304c\u30b9\u30e0\u30fc\u30ba\u306b\u9032\u307f\u307e\u3059\u3002\u6b21\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3084HTML\u30d5\u30a1\u30a4\u30eb\u3092\u3069\u306e\u3088\u3046\u306b\u7d44\u307f\u8fbc\u3093\u3067\u3044\u304f\u304b\u3092\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\uff01\n  <\/p>\n<p>1. <strong>\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u306eHTML\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/strong><\/p>\n<p>\n    \u307e\u305a\u306f\u3001\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u306e\u30b3\u30fc\u30c9\u3092HTML\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4f5c\u6210\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306epublic\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u306f index.html<br \/>\n    \u3068\u3057\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u3067\u3059\u3002\n  <\/p>\n<pre><code>&lt;!DOCTYPE html&gt;\r\n  &lt;html lang=<span>\"ja\"<\/span>&gt;\r\n  &lt;head&gt;\r\n      &lt;meta charset=<span>\"UTF-8\"<\/span>&gt;\r\n      &lt;meta name=<span>\"viewport\"<\/span> content=<span>\"width=device-width, initial-scale=1.0\"<\/span>&gt;\r\n      &lt;title&gt;\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb&lt;\/title&gt;\r\n      &lt;style&gt;\r\n        * {\r\n          margin: <span>0<\/span>;\r\n          padding: <span>0<\/span>;\r\n        }\r\n        .main {\r\n          width: <span>100<\/span>%;\r\n          padding: <span>1<\/span>% <span>5<\/span>%;\r\n          margin: <span>0<\/span> auto;\r\n          max-width: <span>80<\/span>%;\r\n        }\r\n        .balloon-top {\r\n          position: relative;\r\n          display: inline-block;\r\n          margin: <span>1.5<\/span>em <span>0<\/span>;\r\n          padding: <span>7<\/span>px <span>10<\/span>px;\r\n          min-width: <span>120<\/span>px;\r\n          max-width: <span>100<\/span>%;\r\n          color: <span>#555;<\/span>\r\n          font-size: <span>16<\/span>px;\r\n          background: <span>#fff;<\/span>\r\n          border: solid <span>3<\/span>px <span>#555;<\/span>\r\n          border-radius: <span>20<\/span>px;\r\n          box-sizing: border-box;\r\n        }\r\n        .balloon-top:before {\r\n          content: <span>\"\"<\/span>;\r\n          position: absolute;\r\n          top: <span>-24<\/span>px;\r\n          left: <span>50<\/span>%;\r\n          margin-left: <span>-15<\/span>px;\r\n          border: <span>12<\/span>px solid transparent;\r\n          border-bottom: <span>12<\/span>px solid <span>#fff;<\/span>\r\n          z-index: <span>2<\/span>;\r\n        }\r\n        .balloon-top:after {\r\n          content: <span>\"\"<\/span>;\r\n          position: absolute;\r\n          top: <span>-30<\/span>px;\r\n          left: <span>50<\/span>%;\r\n          margin-left: <span>-17<\/span>px;\r\n          border: <span>14<\/span>px solid transparent;\r\n          border-bottom: <span>14<\/span>px solid <span>#555;<\/span>\r\n          z-index: <span>1<\/span>;\r\n        }\r\n        .balloon-top p {\r\n          font-size: <span>20<\/span>px;\r\n          margin: <span>20<\/span>px;\r\n          padding: <span>0<\/span>;\r\n        }\r\n      &lt;\/style&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div <span>class<\/span>=<span>\"main\"<\/span>&gt;\r\n      &lt;div <span>class<\/span>=<span>\"speech__bubble\"<\/span>&gt;\r\n        &lt;div <span>class<\/span>=<span>\"balloon-top\"<\/span>&gt;\r\n          &lt;p id=<span>\"result_text\"<\/span>&gt;&lt;\/p&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  \r\n    &lt;script&gt;\r\n      window.onload = function () {\r\n        <span>const<\/span> recognize = () =&gt; {\r\n          <span>const<\/span> SpeechRecognition = webkitSpeechRecognition || SpeechRecognition;\r\n          <span>const<\/span> e = document.getElementById(<span>\"result_text\"<\/span>);\r\n          <span>const<\/span> message = document.createElement(<span>\"p\"<\/span>);\r\n          message.textContent = <span>\"\u30de\u30a4\u30af\u306e\u8a31\u53ef\u3092\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"<\/span>;\r\n          message.style.color = <span>\"red\"<\/span>;\r\n          document.body.appendChild(message);\r\n  \r\n          <span>let<\/span> recognition;\r\n          <span>let<\/span> currentHTML = <span>\"\"<\/span>;\r\n  \r\n          <span>const<\/span> init = () =&gt; {\r\n            recognition = <span>new<\/span> SpeechRecognition();\r\n            recognition.lang = <span>\"ja-JP\"<\/span>;\r\n            recognition.continuous = <span>false<\/span>;\r\n            recognition.interimResults = <span>true<\/span>;\r\n  \r\n            recognition.onresult = (<span>event<\/span>) =&gt; {\r\n              <span>const<\/span> text = <span>event<\/span>.results[<span>0<\/span>][<span>0<\/span>].transcript;\r\n              e.innerHTML = currentHTML + text;\r\n              <span>if<\/span> (<span>event<\/span>.results[<span>0<\/span>].isFinal) {\r\n                restart();\r\n              }\r\n            };\r\n  \r\n            recognition.onspeechstart = () =&gt; {\r\n              currentHTML = <span>\"\"<\/span>;\r\n            };\r\n  \r\n            recognition.onerror = restart;\r\n            recognition.onsoundend = restart;\r\n          };\r\n  \r\n          <span>const<\/span> restart = () =&gt; {\r\n            recognition.stop();\r\n            init();\r\n            recognition.start();\r\n          };\r\n  \r\n          init();\r\n          recognition.start();\r\n        };\r\n  \r\n        recognize();\r\n      };\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n  &lt;\/html&gt;<\/code><\/pre>\n<p><strong>\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3092\u4fee\u6b63<\/strong><\/p>\n<p>\u6b21\u306b\u3001index.js\u3067\u9759\u7684\u30d5\u30a1\u30a4\u30eb\uff08HTML\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002public\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308bindex.html\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><code><span>const<\/span> express = <span>require<\/span>(<span>'express'<\/span>);\r\n  <span>const<\/span> path = <span>require<\/span>(<span>'path'<\/span>);\r\n  <span>const<\/span> app = express();\r\n  <span>const<\/span> port = <span>3000<\/span>;\r\n  \r\n  <span>\/\/ \u9759\u7684\u30d5\u30a1\u30a4\u30eb\u3092public\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a<\/span>\r\n  app.use(express.static(path.join(__dirname, <span>'public'<\/span>)));\r\n  \r\n  <span>\/\/ \u30eb\u30fc\u30c8\uff08\"\/\"\uff09\u306b\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u5834\u5408\u306btranscription.html\u3092\u8fd4\u3059\u51e6\u7406<\/span>\r\n  app.get(<span>'\/'<\/span>, <span>(<span>req, res<\/span>) =&gt;<\/span> {\r\n    res.sendFile(path.join(__dirname, <span>'public'<\/span>, <span>'index.html'<\/span>));\r\n  });\r\n  \r\n  <span>\/\/ \u30b5\u30fc\u30d0\u30fc\u3092\u6307\u5b9a\u3057\u305f\u30dd\u30fc\u30c8\u3067\u7acb\u3061\u4e0a\u3052\u308b<\/span>\r\n  app.listen(port, <span><span>()<\/span> =&gt;<\/span> {\r\n    <span>console<\/span>.log(<span>`Server is running at http:\/\/localhost:<span>${port}<\/span>`<\/span>);\r\n  });<\/code><\/pre>\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001index.html\u304c\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3055\u308c\u3001\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u304c\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>3. <strong>\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5<\/strong><\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u306e\u3067\u3001\u518d\u5ea6\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre><code><span>node<\/span> <span>index<\/span><span>.js<\/span><\/code><\/pre>\n<p>4. <strong>\u30d6\u30e9\u30a6\u30b6\u3067\u78ba\u8a8d<\/strong><\/p>\n<p>\n    \u6700\u5f8c\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3067 http:\/\/localhost:3000<br \/>\n    \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3059\u308b\u3068\u3001\u4f5c\u6210\u3057\u305f<strong>\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb<\/strong>\u304c\u8868\u793a\u3055\u308c\u3001\u97f3\u58f0\u8a8d\u8b58\u6a5f\u80fd\u304c\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\uff01\n  <\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/route-zero.com\/recruit\/wp-content\/uploads\/2025\/02\/941_3.jpg\" alt=\"\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb_\u5b9f\u884c\u30a4\u30e1\u30fc\u30b8\" width=\"620\" height=\"310\" loading=\"lazy\" \/><\/figure>\n<h3>\u6700\u5f8c\u306b<\/h3>\n<p>\n    \u3053\u308c\u3067\u3001Node.js\u3068Express\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u8d77\u3053\u3057\u30c4\u30fc\u30eb\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\uff01\u30b5\u30fc\u30d0\u30fc\u306e\u7acb\u3061\u4e0a\u3052\u304b\u3089\u3001\u9759\u7684\u30d5\u30a1\u30a4\u30eb\u306e\u63d0\u4f9b\u3001\u305d\u3057\u3066\u97f3\u58f0\u8a8d\u8b58\u3092\u6d3b\u7528\u3057\u305f\u30c4\u30fc\u30eb\u306e\u8868\u793a\u307e\u3067\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u306e\u57fa\u790e\u3092\u3057\u3063\u304b\u308a\u3068\u7406\u89e3\u3067\u304d\u305f\u3068\u601d\u3044\u307e\u3059\u3002\n  <\/p>\n<p>\n    \u4eca\u5f8c\u306f\u3001\u3055\u3089\u306b\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3084\u52d5\u7684\u306a\u51e6\u7406\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3063\u3066\u9332\u97f3\u3057\u305f\u97f3\u58f0\u3092\u4fdd\u5b58\u3057\u305f\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u7ba1\u7406\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd\u304c\u5e83\u304c\u308a\u307e\u3059\u3002\n  <\/p>\n<p>\n    \u305c\u3072\u3001\u4eca\u56de\u5b66\u3093\u3060\u5185\u5bb9\u3092\u6d3b\u304b\u3057\u3066\u3001\u81ea\u5206\u3060\u3051\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u4e0a\u3052\u3066\u3044\u3063\u3066\u304f\u3060\u3055\u3044\u3002\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3078\u9032\u3080\u305f\u3081\u306e\u7b2c\u4e00\u6b69\u3092\u8e0f\u307f\u51fa\u305b\u305f\u3053\u3068\u3092\u304a\u795d\u3044\u3057\u307e\u3059\uff01\u6b21\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u3055\u3089\u306b\u9032\u3093\u3060\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u306b\u6311\u6226\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u304a\u75b2\u308c\u3055\u307e\u3067\u3057\u305f\uff01\n  <\/p>\n<\/div>\n","protected":false},"featured_media":945,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/941"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/945"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}