{"id":1809,"date":"2025-07-23T13:31:05","date_gmt":"2025-07-23T04:31:05","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1809"},"modified":"2025-12-23T13:33:46","modified_gmt":"2025-12-23T04:33:46","slug":"next-js%e3%83%bbnode-js%e5%be%b9%e5%ba%95%e6%af%94%e8%bc%83%ef%bd%9c7%e3%81%a4%e3%81%ae%e8%a6%b3%e7%82%b9%e3%81%a8api%e9%80%a3%e6%90%ba%e3%81%ae%e3%83%99%e3%82%b9%e3%83%88%e3%83%97%e3%83%a9%e3%82%af","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1809\/","title":{"rendered":"Next.js\u30fbNode.js\u5fb9\u5e95\u6bd4\u8f03\uff5c7\u3064\u306e\u89b3\u70b9\u3068API\u9023\u643a\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9"},"content":{"rendered":"<div>\n<h1>\u3010\u56f3\u89e3\u3011Next.js\u3068Node.js\u306e\u9055\u3044\u306f\uff1f\u5f79\u5272\u30fb\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fb\u4f7f\u3044\u5206\u3051\u3092\u5fb9\u5e95\u89e3\u8aac<\/h1>\n<p>\n    <strong>Next.js\u306fNode.js\u4e0a\u3067\u52d5\u304f\u2015\u2015\u3067\u3082\u3001\u4f55\u304c\u3069\u3046\u9055\u3046\u306e\uff1f<\/strong><br \/>\n    <strong>API\u306fRoute Handlers\u3067\u5b8c\u7d50\uff1fExpress\u30b5\u30fc\u30d0\u30fc\u3092\u5225\u3067\u7acb\u3066\u308b\u3079\u304d\uff1f<\/strong><br \/>\n    \u305d\u3093\u306a\u201c\u73fe\u5834\u306e\u30e2\u30e4\u30e2\u30e4\u201d\u306b\u76f4\u9762\u3057\u305f\u65b9\u3078\u3001<strong>Next.js\u3068Node.js\uff08Express\uff09<\/strong>\u306e\u9055\u3044\u3068\u30d9\u30b9\u30c8\u306a\u4f7f\u3044\u5206\u3051\u3092\u3001<strong>\u5b9f\u52d9\u76ee\u7dda\u3067\u6574\u7406<\/strong>\u3057\u307e\u3057\u305f\u3002<br \/>\n    \u300c\u9055\u3044\u304c\u66d6\u6627\u306a\u307e\u307e\u4f7f\u3063\u3066\u3044\u3066\u4e0d\u5b89\u300d\u300c\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3084\u904b\u7528\u9762\u3067\u6700\u9069\u306a\u9078\u629e\u3092\u3057\u305f\u3044\u300d\u2015\u2015\u305d\u3093\u306a\u79c1\u305f\u3061\u306e\u60a9\u307f\u3092\u3001<strong>7\u3064\u306e\u89b3\u70b9\u00d7\u5b9f\u8df5\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/strong>\u3067\u5fb9\u5e95\u7684\u306b\u89e3\u6d88\u3057\u307e\u3059\u3002\n  <\/p>\n<p>\n    \uff08Node.js\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u3084package.json\u306e\u57fa\u790e\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1788\/\" target=\"_blank\" rel=\"noopener\">package.json\u3092\u5b8c\u5168\u7406\u89e3\uff5cNode.js\u521d\u5fc3\u8005\u3067\u3082\u8ff7\u308f\u306a\u3044\u4f7f\u3044\u65b9\u30fb\u30a8\u30e9\u30fc\u5bfe\u7b56<\/a\n    >\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aNext.js<\/strong><br \/>React\u3092\u57fa\u76e4\u3068\u3057\u305f\u30d5\u30eb\u30b9\u30bf\u30c3\u30afWeb\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3002SSR\u3084API\u958b\u767a\u306a\u3069\u30d5\u30ed\u30f3\u30c8\u30fb\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u4e21\u65b9\u3092\u30ab\u30d0\u30fc\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aNode.js<\/strong><br \/>JavaScript\u3092\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u3067\u52d5\u304b\u3059\u305f\u3081\u306e\u5b9f\u884c\u74b0\u5883\u3002V8\u30a8\u30f3\u30b8\u30f3\u3092\u5229\u7528\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aExpress<\/strong><br \/>Node.js\u4e0a\u3067\u52d5\u4f5c\u3059\u308bWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3002API\u3084Web\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u306b\u5e83\u304f\u4f7f\u308f\u308c\u308b\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aAPI<\/strong><br \/>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540c\u58eb\u304c\u30c7\u30fc\u30bf\u3084\u6a5f\u80fd\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u305f\u3081\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aRoute Handlers<\/strong><br \/>Next.js\u306eAPI\u30eb\u30fc\u30c8\u6a5f\u80fd\u3002app\/api\/\u914d\u4e0b\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304f\u3060\u3051\u3067API\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3067\u304d\u308b\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2>1. \u3010\u56f3\u89e3\u3011Next.js\u3068Node.js\u306e\u5f79\u5272\u30fb\u95a2\u4fc2\u6027\u30925\u5206\u3067\u7406\u89e3<\/h2>\n<p>\n    \u307e\u305a\u3001<strong>\u6839\u672c\u7684\u306a\u9055\u3044<\/strong>\u3068\u201c\u91cd\u306a\u308a\u65b9\u201d\u3092\u6574\u7406\u3057\u307e\u3059\u3002<br \/>\n    \u4e21\u8005\u306f\u7af6\u5408\u3067\u306f\u306a\u304f\u3001<strong>\u968e\u5c64\u69cb\u9020\u3067\u9023\u643a<\/strong>\u3059\u308b\u5b58\u5728\u3067\u3059\u3002\n  <\/p>\n<ul>\n<li>\n      <strong>\u57fa\u76e4\uff1aNode.js\uff08\u5b9f\u884c\u74b0\u5883\uff09<\/strong><\/p>\n<ul>\n<li>\n          <strong>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\/\u30e9\u30a4\u30d6\u30e9\u30ea\uff1aExpress\u306a\u3069<\/strong><\/p>\n<ul>\n<li><strong>\u4e0a\u4f4d\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\uff1aNext.js<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Node.js \u2015 \u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9JavaScript\u306e\u300c\u5b9f\u884c\u74b0\u5883\u300d<\/h3>\n<p>\n    <strong>Node.js<\/strong>\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u5916\u3067<strong>JavaScript<\/strong>\u3092\u52d5\u304b\u305b\u308b\u300c\u5b9f\u884c\u74b0\u5883\u300d\u3067\u3059\u3002<br \/>\n    Chrome\u306eV8\u30a8\u30f3\u30b8\u30f3\u3092\u30d9\u30fc\u30b9\u306b\u3001\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u3084\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u901a\u4fe1\u306a\u3069\u3001\u30b5\u30fc\u30d0\u30fc\u306a\u3089\u3067\u306f\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<br \/>\n    \u4f8b\u3048\u3070<strong>Express<\/strong>\u306e\u3088\u3046\u306aWeb\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f\u3001\u3053\u306e<strong>Node.js<\/strong>\u4e0a\u3067\u52d5\u304f\u201c\u30e9\u30a4\u30d6\u30e9\u30ea\u201d\u306e1\u3064\u3067\u3059\u3002<br \/>\n    \u672c\u8a18\u4e8b\u3067\u306f\u3001<strong>Node.js + Express<\/strong>\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u524d\u63d0\u306b\u6bd4\u8f03\u3092\u9032\u3081\u307e\u3059\u3002\n  <\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aV8\u30a8\u30f3\u30b8\u30f3<\/strong><br \/>Google Chrome\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u9ad8\u901fJavaScript\u30a8\u30f3\u30b8\u30f3\u3002Node.js\u3082\u3053\u308c\u3092\u5229\u7528\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30e9\u30a4\u30d6\u30e9\u30ea<\/strong><br \/>\u7279\u5b9a\u306e\u6a5f\u80fd\u3092\u307e\u3068\u3081\u305f\u518d\u5229\u7528\u53ef\u80fd\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u90e8\u54c1\u3002<\/p>\n<\/blockquote>\n<h3>Next.js \u2015 Node.js\u4e0a\u3067\u52d5\u304fReact\u306e\u300c\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300d<\/h3>\n<p>\n    <strong>Next.js<\/strong>\u306f\u3001React\u3092\u57fa\u76e4\u3068\u3059\u308b<strong>\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/strong>\u3002<br \/>\n    SSR\uff08\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\uff09\u3001SSG\uff08\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210\uff09\u3001API\u958b\u767a\uff08<strong>Route Handlers<\/strong>\uff09\u306a\u3069\u3001<strong>\u30d5\u30ed\u30f3\u30c8\u301c\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u307e\u3067\u4e00\u8cab<\/strong>\u3057\u305f\u6a5f\u80fd\u3092\u6301\u3061\u307e\u3059\u3002<br \/>\n    \u30dd\u30a4\u30f3\u30c8\u306f\u3001<strong>Next.js\u81ea\u8eab\u3082Node.js\u74b0\u5883\u3067\u52d5\u4f5c<\/strong>\u3059\u308b\u3053\u3068\u3002<br \/>\n    \u958b\u767a\u30fb\u672c\u756a\u554f\u308f\u305a\u3001\u88cf\u3067\u306f<strong>Node.js<\/strong>\u304c\u52d5\u3044\u3066\u3044\u307e\u3059\u3002\n  <\/p>\n<p>\u65e5\u5e38\u751f\u6d3b\u3067\u306e\u4f8b\u3048\u3067\u6574\u7406\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u4f8b\u3048\uff1a\u5bb6\u306e\u5efa\u7bc9\u3067\u8003\u3048\u308bNext.js\u3068Node.js\u306e\u95a2\u4fc2\u6027<\/h4>\n<p>\u5bb6\u3092\u5efa\u3066\u308b\u969b\u306e\u69cb\u9020\u306b\u4f8b\u3048\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>Node.js<\/strong>\u306f\u300c\u5bb6\u306e\u571f\u53f0\u3084\u57fa\u790e\u300d<\/li>\n<li><strong>Express<\/strong>\u306f\u300c\u5bb6\u306e\u58c1\u3084\u5c4b\u6839\u300d<\/li>\n<li><strong>Next.js<\/strong>\u306f\u300c\u5bb6\u5168\u4f53\u300d<\/li>\n<\/ul>\n<p>\n    \u3064\u307e\u308a\u3001<strong>Next.js<\/strong>\u306f<strong>Node.js<\/strong>\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u3066\u304a\u308a\u3001\u4e21\u8005\u306f\u88dc\u5b8c\u95a2\u4fc2\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n    \u3053\u308c\u306b\u3088\u308a\u3001<strong>Next.js<\/strong>\u306f<strong>Node.js<\/strong>\u306e\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u3064\u3064\u3001\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u4f7f\u3044\u3084\u3059\u3044\u62bd\u8c61\u5316\u3055\u308c\u305fAPI\u3084\u30c4\u30fc\u30eb\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\n  <\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aSSR\uff08\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\uff09<\/strong><br \/>\u30b5\u30fc\u30d0\u30fc\u5074\u3067HTML\u3092\u751f\u6210\u3057\u3001\u521d\u671f\u8868\u793a\u3092\u9ad8\u901f\u5316\u3059\u308b\u624b\u6cd5\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aSSG\uff08\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210\uff09<\/strong><br \/>\u30d3\u30eb\u30c9\u6642\u306bHTML\u3092\u751f\u6210\u3057\u3001CDN\u7b49\u3067\u914d\u4fe1\u3059\u308b\u65b9\u5f0f\u3002\u9ad8\u901f\u30fb\u4f4e\u30b3\u30b9\u30c8\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/strong><br \/>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3068\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u4e21\u65b9\u306e\u958b\u767a\u3092\u4e00\u8cab\u3057\u3066\u884c\u3048\u308b\u67a0\u7d44\u307f\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2>2. \u30107\u3064\u306e\u89b3\u70b9\u3011Next.js vs Node.js\uff08Express\uff09\u5fb9\u5e95\u6bd4\u8f03<\/h2>\n<p>\u5f79\u5272\u306e\u9055\u3044\u3092\u8e0f\u307e\u3048\u3001<strong>7\u9805\u76ee\u3067\u201c\u73fe\u5834\u7684\u306b\u672c\u5f53\u306b\u91cd\u8981\u306a\u9055\u3044\u201d<\/strong>\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n<h3>2-1. \u3010\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3011\u30d5\u30eb\u30b9\u30bf\u30c3\u30af vs \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u7279\u5316<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1a\u30d5\u30ed\u30f3\u30c8\u3068\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304c\u4e00\u4f53\u5316\u3057\u305f\u300c<strong>\u30d5\u30eb\u30b9\u30bf\u30c3\u30af<\/strong>\u300d\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3002<strong>BFF<\/strong>\uff08Backend For Frontend\uff09\u7528\u9014\u304c\u5f97\u610f\u3002<\/li>\n<li><strong>Node.js\uff08Express\uff09<\/strong>\uff1a<strong>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u5c02\u7528\u30b5\u30fc\u30d0\u30fc<\/strong>\u3002API\u63d0\u4f9b\u3084\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u5358\u4f4d\u3067\u306e\u72ec\u7acb\u904b\u7528\u306b\u6700\u9069\u3002<\/li>\n<\/ul>\n<p>\n    \uff08\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u9078\u3073\u65b9\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1789\/\" target=\"_blank\" rel=\"noopener\">\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u5fb9\u5e95\u6bd4\u8f03\uff01React\u30fbVue\u30fbAngular\u9055\u3044\u3068\u9078\u3073\u65b9<\/a\n    >\u300f\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\uff09\n  <\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aBFF\uff08Backend For Frontend\uff09<\/strong><br \/>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3054\u3068\u306b\u6700\u9069\u5316\u3055\u308c\u305f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9API\u3092\u63d0\u4f9b\u3059\u308b\u8a2d\u8a08\u30d1\u30bf\u30fc\u30f3\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3<\/strong><br \/>\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u69cb\u9020\u3084\u8a2d\u8a08\u601d\u60f3\u306e\u3053\u3068\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9<\/strong><br \/>\u6a5f\u80fd\u3054\u3068\u306b\u72ec\u7acb\u3057\u305f\u5c0f\u3055\u306a\u30b5\u30fc\u30d3\u30b9\u7fa4\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u624b\u6cd5\u3002<\/p>\n<\/blockquote>\n<h3>2-2. \u3010\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3011SSR\/Edge vs \u30b7\u30f3\u30b0\u30eb\u30d7\u30ed\u30bb\u30b9<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1aSSR\/ISR\u3067\u521d\u671f\u8868\u793a\u304c\u901f\u3044\u3002Vercel\u7b49\u306eEdge Functions\u6d3b\u7528\u3067\u201c<strong>\u30e6\u30fc\u30b6\u30fc\u306b\u8fd1\u3044\u5834\u6240<\/strong>\u201d\u3067\u9ad8\u901f\u5fdc\u7b54\u3002<\/li>\n<li>\n      <strong>Node.js\uff08Express\uff09<\/strong>\uff1a\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9&amp;\u30a4\u30d9\u30f3\u30c8\u30eb\u30fc\u30d7\u3067\u5927\u91cfI\/O\u306b\u5f37\u3044\u3002<br \/>\n      CPU\u30d8\u30d3\u30fc\u306a\u51e6\u7406\u306f\u5168\u4f53\u3092\u30d6\u30ed\u30c3\u30af\u3057\u3084\u3059\u3044\u304c\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u901a\u4fe1\u3084\u8907\u96d1\u30ed\u30b8\u30c3\u30af\u306b\u306f\u25ce\u3002\n    <\/li>\n<\/ul>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aEdge Functions<\/strong><br \/>CDN\u306e\u30a8\u30c3\u30b8\uff08\u30e6\u30fc\u30b6\u30fc\u8fd1\u304f\uff09\u3067\u5b9f\u884c\u3055\u308c\u308b\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u95a2\u6570\u3002\u4f4e\u9045\u5ef6\u3067\u5fdc\u7b54\u53ef\u80fd\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9<\/strong><br \/>1\u3064\u306e\u51e6\u7406\u5358\u4f4d\uff08\u30b9\u30ec\u30c3\u30c9\uff09\u3067\u5168\u3066\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9806\u6b21\u51e6\u7406\u3059\u308b\u65b9\u5f0f\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a4\u30d9\u30f3\u30c8\u30eb\u30fc\u30d7<\/strong><br \/>\u975e\u540c\u671f\u51e6\u7406\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308bNode.js\u306e\u4ed5\u7d44\u307f\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aI\/O<\/strong><br \/>Input\/Output\u3002\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u51e6\u7406\u5168\u822c\u3002<\/p>\n<\/blockquote>\n<h3>2-3. \u3010API\u958b\u767a\u3011Route Handlers vs Express<\/h3>\n<ul>\n<li>\n      <strong>Next.js\uff08Route Handlers\uff09<\/strong>\uff1a<strong>app\/api\/route.ts<\/strong>\u3092\u7f6e\u304f\u3060\u3051\u3067<strong>\u76f4\u611f\u7684\u306aAPI<\/strong>\u304c\u4f5c\u308c\u308b\u3002<br \/>\n      \u5c0f\u301c\u4e2d\u898f\u6a21\u306b\u5411\u304f\u3002<\/p>\n<pre><code>\/\/ app\/api\/hello\/route.ts\r\n\r\nexport async function GET(request: Request) {\r\n  return new Response('Hello, Next.js!');\r\n}\r\n<\/code><\/pre>\n<\/li>\n<li>\n      <strong>Express<\/strong>\uff1a\u67d4\u8edf\u3060\u304c\u8a18\u8ff0\u91cf\u304c\u5897\u3048\u3084\u3059\u3044\u3002<br \/>\n      \u5927\u898f\u6a21API\u30fb\u8907\u96d1\u51e6\u7406\u306b\u6700\u9069\u3002<\/p>\n<pre><code>\/\/ server.js\r\n\r\nconst express = require('express');\r\nconst app = express();\r\n\r\napp.get('\/api\/hello', (req, res) => {\r\n  res.send('Hello, Express!');\r\n});\r\n\r\napp.listen(3001);\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aCRUD<\/strong><br \/>Create, Read, Update, Delete\u306e\u7565\u3002\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u64cd\u4f5c\u306e4\u6a5f\u80fd\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/strong><br \/>API\u3067\u5916\u90e8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308bURL\u3084\u30d1\u30b9\u306e\u3053\u3068\u3002<\/p>\n<\/blockquote>\n<h3>2-4. \u3010\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30fb\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3011<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1a<strong>middleware.ts<\/strong>\u3067\u8a8d\u8a3c\u30fb\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u7b49\u306e\u5236\u5fa1\u304c\u53ef\u80fd\u3002\u4e3b\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u6539\u5909\u304c\u76ee\u7684\u3002<\/li>\n<li><strong>Express<\/strong>\uff1a\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u67d4\u8edf\u306a\u7d44\u307f\u5408\u308f\u305b\u304c\u6838\u3002\u30ed\u30ae\u30f3\u30b0\u3001\u8a8d\u8a3c\u3001\u30a8\u30e9\u30fc\u51e6\u7406\u7b49\u3092\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u5316\u3002<\/li>\n<\/ul>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30df\u30c9\u30eb\u30a6\u30a7\u30a2<\/strong><br \/>\u30ea\u30af\u30a8\u30b9\u30c8\u3084\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u51e6\u7406\u3092\u62e1\u5f35\u30fb\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u4e2d\u9593\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3<\/strong><br \/>\u8907\u6570\u306e\u51e6\u7406\u3092\u9806\u756a\u306b\u6d41\u3059\u4ed5\u7d44\u307f\u3002\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u9023\u7d50\u306a\u3069\u3002<\/p>\n<\/blockquote>\n<h3>2-5. \u3010DB\u63a5\u7d9a\u3011\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u6642\u306eORM\u6ce8\u610f\u70b9<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1a\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u74b0\u5883\u3067\u306f<strong>\u63a5\u7d9a\u7ba1\u7406\u306b\u5de5\u592b<\/strong>\uff08Prisma\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u30ad\u30e3\u30c3\u30b7\u30e5\u7b49\u304c\u5fc5\u9808\uff09\u3002<\/li>\n<li><strong>Express<\/strong>\uff1a\u6c38\u7d9a\u30b5\u30fc\u30d0\u30fc\u306a\u306e\u3067<strong>DB\u63a5\u7d9a\u30d7\u30fc\u30eb<\/strong>\u3092\u8d77\u52d5\u6642\u306b\u4f5c\u308c\u3070OK\u3002<\/li>\n<\/ul>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9<\/strong><br \/>\u30a4\u30f3\u30d5\u30e9\u7ba1\u7406\u4e0d\u8981\u3067\u81ea\u52d5\u30b9\u30b1\u30fc\u30eb\u3059\u308b\u5b9f\u884c\u74b0\u5883\u3002FaaS\u306a\u3069\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aORM<\/strong><br \/>Object Relational Mapping\u3002DB\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u8a00\u8a9e\u306e\u6a4b\u6e21\u3057\u3092\u3059\u308b\u4ed5\u7d44\u307f\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u63a5\u7d9a\u30d7\u30fc\u30eb<\/strong><br \/>DB\u63a5\u7d9a\u3092\u307e\u3068\u3081\u3066\u7ba1\u7406\u3057\u3001\u52b9\u7387\u7684\u306b\u518d\u5229\u7528\u3059\u308b\u6280\u8853\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30b0\u30ed\u30fc\u30d0\u30eb\u30ad\u30e3\u30c3\u30b7\u30e5<\/strong><br \/>\u30a2\u30d7\u30ea\u5168\u4f53\u3067\u5171\u6709\u3055\u308c\u308b\u30ad\u30e3\u30c3\u30b7\u30e5\u9818\u57df\u3002DB\u63a5\u7d9a\u306e\u518d\u5229\u7528\u306a\u3069\u306b\u4f7f\u3046\u3002<\/p>\n<\/blockquote>\n<h3>2-6. \u3010\u30c7\u30d7\u30ed\u30a4\u30fb\u904b\u7528\u3011Vercel vs AWS\/Docker<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1a<strong>Vercel<\/strong>\u9023\u643a\u304c\u6700\u9069\u89e3\u3002Git\u9023\u643a\u3060\u3051\u3067CI\/CD\u304c\u5373\u69cb\u7bc9\u3002<\/li>\n<li><strong>Express<\/strong>\uff1a<strong>Docker<\/strong>\u3067\u30b3\u30f3\u30c6\u30ca\u5316\u3057\u3001AWS\u3084GCP\u3078\u3002\u904b\u7528\u81ea\u7531\u5ea6\u306f\u9ad8\u3044\u304c\u77e5\u8b58\u3082\u5fc5\u8981\u3002<\/li>\n<\/ul>\n<p>\n    \uff08CI\/CD\u3084Docker\u306b\u3088\u308b\u958b\u767a\u81ea\u52d5\u5316\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1755\/\" target=\"_blank\" rel=\"noopener\">SES\u73fe\u5834\u306eCI\/CD\u5c0e\u5165\u3068\u306f\uff1f\u672a\u7d4c\u9a13\u304b\u3089\u3067\u304d\u308b\u81ea\u52d5\u5316\u5b8c\u5168\u30ac\u30a4\u30c9<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aVercel<\/strong><br \/>Next.js\u958b\u767a\u5143\u304c\u63d0\u4f9b\u3059\u308b\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u3002\u30c7\u30d7\u30ed\u30a4\u3084CDN\u3001Edge Functions\u306a\u3069\u3092\u7c21\u5358\u306b\u5229\u7528\u53ef\u80fd\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aCI\/CD<\/strong><br \/>\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\uff0f\u7d99\u7d9a\u7684\u30c7\u30ea\u30d0\u30ea\u30fc\u3002\u81ea\u52d5\u30c6\u30b9\u30c8\u30fb\u81ea\u52d5\u30c7\u30d7\u30ed\u30a4\u306e\u4ed5\u7d44\u307f\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aDocker<\/strong><br \/>\u30a2\u30d7\u30ea\u3084\u74b0\u5883\u3092\u30b3\u30f3\u30c6\u30ca\u5358\u4f4d\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u30fb\u914d\u5e03\u30fb\u5b9f\u884c\u3067\u304d\u308b\u6280\u8853\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aGCP<\/strong><br \/>Google Cloud Platform\u3002Google\u306e\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u7fa4\u3002<\/p>\n<\/blockquote>\n<h3>2-7. \u3010\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u30fb\u5c06\u6765\u6027\u3011<\/h3>\n<ul>\n<li><strong>Next.js<\/strong>\uff1aVercel\u8d77\u70b9\u306e<strong>\u30d5\u30ed\u30f3\u30c8\u958b\u767aDX<\/strong>\u91cd\u8996\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u304c\u6025\u62e1\u5927\u3002React\u9032\u5316\u3068\u9023\u52d5\u3002<\/li>\n<li><strong>Express<\/strong>\uff1a10\u5e74\u4ee5\u4e0a\u306e\u5b9f\u7e3e\u30fb\u5927\u91cfnpm\u30e9\u30a4\u30d6\u30e9\u30ea\u3067<strong>\u6210\u719f\u3057\u305f\u4fe1\u983c\u6027<\/strong>\u3002<\/li>\n<\/ul>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0<\/strong><br \/>\u95a2\u9023\u30c4\u30fc\u30eb\u3084\u30b5\u30fc\u30d3\u30b9\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306a\u3069\u3092\u542b\u3081\u305f\u6280\u8853\u306e\u751f\u614b\u7cfb\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1aDX<\/strong><br \/>\u30c7\u30b8\u30bf\u30eb\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e1\u30fc\u30b7\u30e7\u30f3\u3002IT\u6d3b\u7528\u306b\u3088\u308b\u696d\u52d9\u3084\u4fa1\u5024\u306e\u5909\u9769\u3002<\/p>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1anpm<\/strong><br \/>Node.js\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3002\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u914d\u5e03\u30fb\u7ba1\u7406\u306b\u4f7f\u3046\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2>3. Next.js\u304b\u3089\u65e2\u5b58Node.js\uff08Express\uff09API\u9023\u643a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/h2>\n<h3>3-1. \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304b\u3089fetch\/SWR<\/h3>\n<pre><code>'use client';\r\nimport useSWR from 'swr';\r\n\r\nconst fetcher = (url: string) => fetch(url).then(res => res.json());\r\n\r\nfunction Profile() {\r\n  \/\/ \u65e2\u5b58Node.js API\u3092\u53e9\u304f\r\n  const { data, error } = useSWR('http:\/\/localhost:3001\/api\/user\/1', fetcher);\r\n\r\n  if (error) return &lt;div&gt;Failed to load&lt;\/div&gt;;\r\n  if (!data) return &lt;div&gt;Loading...&lt;\/div&gt;;\r\n\r\n  return &lt;div&gt;Hello, {data.name}!&lt;\/div&gt;;\r\n}\r\n<\/code><\/pre>\n<h3>3-2. \u30b5\u30fc\u30d0\u30fc\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304b\u3089\u30bb\u30ad\u30e5\u30a2API\u30b3\u30fc\u30eb<\/h3>\n<pre><code>\/\/ app\/dashboard\/page.tsx\r\nasync function getUserData() {\r\n  const res = await fetch('http:\/\/localhost:3001\/api\/data', {\r\n    headers: {\r\n      Authorization: `Bearer ${process.env.API_SECRET_KEY}`,\r\n    },\r\n    cache: 'no-store',\r\n  });\r\n  \r\n  if (!res.ok) throw new Error('Failed to fetch data');\r\n  return res.json();\r\n}\r\n\r\nexport default async function DashboardPage() {\r\n  const data = await getUserData();\r\n\r\n  return (\r\n    &lt;main&gt;\r\n      &lt;h1&gt;Dashboard&lt;\/h1&gt;\r\n      &lt;p&gt;Data: {JSON.stringify(data)}&lt;\/p&gt;\r\n    &lt;\/main&gt;\r\n  );\r\n}\r\n<\/code><\/pre>\n<p>\n    \uff08TypeScript\u306ePromise\u578b\u3084\u975e\u540c\u671f\u51e6\u7406\u306e\u578b\u5b9a\u7fa9\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1798\/\" target=\"_blank\" rel=\"noopener\">TypeScript Promise\u578b\u5b9a\u7fa9\u5b8c\u5168\u89e3\u8aac\uff5cany\u64b2\u6ec5\u3068\u4f7f\u3044\u5206\u3051<\/a\n    >\u300f\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\uff09\n  <\/p>\n<hr \/>\n<h2>4. Next.js\u3068Node.js\u306eFAQ\u3010\u73fe\u5834\u3042\u308b\u3042\u308b\u3011<\/h2>\n<ul>\n<li><strong>Q1. \u3069\u3061\u3089\u304b\u3089\u5b66\u3076\u3079\u304d\uff1f<\/strong><br \/>\u2192 <strong>Node.js\u57fa\u790e\u2192Express\u2192Next.js<\/strong>\u306e\u9806\u304c\u7406\u89e3\u306e\u8fd1\u9053\u3002<\/li>\n<li><strong>Q2. Express\u306f\u4e0d\u8981\uff1f<\/strong><br \/>\u2192 <strong>NO<\/strong>\u3002\u5927\u898f\u6a21API\u3084\u8907\u96d1\u30ed\u30b8\u30c3\u30af\u306fExpress\u306e\u72ec\u58c7\u5834\u3002<strong>\u4f7f\u3044\u5206\u3051\u304c\u672c\u8cea<\/strong>\u3002<\/li>\n<li><strong>Q3. Route Handlers\u3060\u3051\u3067\u5341\u5206\uff1f<\/strong><br \/>\u2192 <strong>\u5c0f\u898f\u6a21\/CRUD\u306a\u3089OK<\/strong>\u3002\u8907\u96d1\u51e6\u7406\u3084\u9577\u671f\u30bf\u30b9\u30af\u306fNode.js\u30b5\u30fc\u30d0\u30fc\u4f75\u7528\u304c\u8ce2\u660e\u3002<\/li>\n<li><strong>Q4. \u306a\u305cVercel\u63a8\u5968\uff1f<\/strong><br \/>\u2192 \u958b\u767a\u5143\u306e\u6700\u9069\u5316\uff06ISR\u3084Edge\u6a5f\u80fd\u3092<strong>\u6700\u5927\u6d3b\u7528<\/strong>\u3067\u304d\u308b\u304b\u3089\u3002<\/li>\n<li><strong>Q5. Docker\u958b\u767a\u74b0\u5883\u306e\u69cb\u7bc9\u306f\uff1f<\/strong><br \/>\u2192 Next.js\uff06Node.js API\u3092<strong>Dockerfile\u3067\u5206\u96e2\u3057docker-compose\u7ba1\u7406<\/strong>\u304c\u4e00\u822c\u7684\u3002<\/li>\n<li><strong>Q7. BFF\uff08Backend For Frontend\uff09\u3068\u306f\uff1f<\/strong><br \/>\u2192 \u8907\u6570API\u3092\u675f\u306d\u201c<strong>\u30d5\u30ed\u30f3\u30c8\u6700\u9069\u5316<\/strong>\u201d\u3057\u305f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3002Next.js\u306fBFF\u69cb\u7bc9\u304c\u5f97\u610f\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li><strong>Node.js<\/strong>\uff1d\u30b5\u30fc\u30d0\u30fc\u3067JS\u3092\u52d5\u304b\u3059\u300c\u5b9f\u884c\u74b0\u5883\u300d<\/li>\n<li><strong>Next.js<\/strong>\uff1d\u305d\u306e\u4e0a\u3067\u52d5\u304f\u300c\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u300d<\/li>\n<li><strong>\u4e21\u8005\u306f\u201c\u7d44\u307f\u5408\u308f\u305b\u308b\u6280\u8853\u201d<\/strong>\u3002\u898f\u6a21\u30fb\u7528\u9014\u306b\u5fdc\u3058\u305f\u201c\u9069\u6750\u9069\u6240\u201d\u304c\u672c\u8cea<\/li>\n<\/ul>\n<p>\n    \uff08NoSQL\u3068SQL\u306e\u9055\u3044\u30fbAPI\u8a2d\u8a08\u306e\u8003\u3048\u65b9\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1807\/\" target=\"_blank\" rel=\"noopener\">NoSQL\u3068SQL\u306e\u9055\u3044\u5fb9\u5e95\u6bd4\u8f03\uff5cRDB\u7d4c\u9a13\u8005\u5411\u30513\u3064\u306e\u58c1\u3068\u4f7f\u3044\u5206\u3051\u30ac\u30a4\u30c9<\/a\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<p>\u307e\u305a\u306f\u624b\u5143\u3067API\u30eb\u30fc\u30c8\u3084\u9023\u643a\u30b3\u30fc\u30c9\u3092\u52d5\u304b\u3057\u3066\u3001\u9055\u3044\u3092\u4f53\u611f\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr \/>\n<\/div>\n","protected":false},"featured_media":1810,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1809"}],"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\/1810"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}