{"id":2137,"date":"2020-03-09T15:04:24","date_gmt":"2020-03-09T06:04:24","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=2137"},"modified":"2021-07-18T10:57:21","modified_gmt":"2021-07-18T01:57:21","slug":"node-js%e3%81%a7%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e3%82%92%e4%bd%9c%e6%88%90%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%e3%81%a8%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=2137","title":{"rendered":"Node.js\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3068\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>Node.js\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306b\u304a\u3044\u3066\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f5c\u6210\u3068\u4f5c\u6210\u3057\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3046\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u306f\u5916\u90e8\u30d5\u30a1\u30a4\u30eb\u3084\u30e2\u30b8\u30e5\u30fc\u30eb\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3051\u308bDRY\u539f\u5247(Don&#8217;t repeat yourself)\u306b\u57fa\u3065\u304d\u3001\u3088\u308a\u8aad\u307f\u3084\u3059\u304f\u52b9\u7387\u7684\u306a\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u76ee\u6307\u3057\u307e\u3059\u3002<\/p>\n<p><img src=\"https:\/\/yuis.xsrv.jp\/data\/egYNr1idd47MWCMktxPj5CXRcTV52X17.png\" alt=\"https:\/\/yuis.xsrv.jp\/data\/egYNr1idd47MWCMktxPj5CXRcTV52X17.png\"><\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>tools.js<\/code>\u3092\u540c\u4e00\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u7f6e\u304f\u3068\u3059\u308b\u3002<\/p>\n<pre><code>cat &gt; tools.js\n\nmodule.exports = {\n  hoge: function () {\n\n            console.log('yy')\n\n  }\n};\n\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>tools.js<\/code>\u3067\u5b9a\u7fa9\u3055\u308c\u305f<code>hoge()<\/code>\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<pre><code>var tools = require('.\/tools');\n\ntools.hoge() ; \/\/ #=&gt; yy\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Node.js\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306b\u304a\u3044\u3066\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f5c\u6210\u3068\u4f5c\u6210\u3057\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3046\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u30d7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[87],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-yt","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2137"}],"collection":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2137"}],"version-history":[{"count":3,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2137\/revisions"}],"predecessor-version":[{"id":2421,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2137\/revisions\/2421"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}