{"id":2784,"date":"2023-08-09T13:27:13","date_gmt":"2023-08-09T04:27:13","guid":{"rendered":"https:\/\/www.agile-software.site\/?p=2784"},"modified":"2023-08-09T13:27:14","modified_gmt":"2023-08-09T04:27:14","slug":"next-js13-app-router%e3%82%92%e7%90%86%e8%a7%a3%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2784","title":{"rendered":"Next.js13 App Router\u3092\u7406\u89e3\u3059\u308b"},"content":{"rendered":"\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npx create-next-app .<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npm i @heroicons\/react@2.0.17 @supabase\/auth-helpers-nextjs@0.6.1 @supabase\/supabase-js@2.21.0 zustand@4.3.8 supabase@1.55.1 date-fns@2.30.0\nnpm i next@13.4.1<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">supabase\u8a2d\u5b9a<\/h2>\n\n\n\n<p>supabase link\u3067supabase\u304b\u3089\u578b\u3092\u7d10\u3065\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npx supabase login\nnpx supabase init\nnpx supabase link --project-ref your_project_id\nnpx supabase gen types typescript --linked &gt; database.types.ts<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p>\u975e\u540c\u671f\u306e\u64cd\u4f5c\u306e\u5b9f\u884c\u3092\u4e00\u6642\u505c\u6b62\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308bPromise\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<br><code>setTimeout<\/code> \u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u6642\u9593\u304c\u7d4c\u904e\u3057\u305f\u5f8c\u306b\u6307\u5b9a\u3055\u308c\u305f\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u30012\u79d2\u5f8c\u306b <code>resolve<\/code> \u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br><code>await<\/code> \u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001Promise\u304c\u89e3\u6c7a\u3055\u308c\u308b\u307e\u3067\u6b21\u306e\u884c\u306e\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u3092\u4e00\u6642\u505c\u6b62\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u306e\u884c\u306e\u51e6\u7406\u306f2\u79d2\u9593\u5f85\u6a5f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>await new Promise((resolve) =&gt; setTimeout(resolve, 2000))<\/code><\/pre><\/div>\n\n\n\nhttps:\/\/www.agile-software.site\/?p=2111\n","protected":false},"excerpt":{"rendered":"<p>supabase\u8a2d\u5b9a supabase link\u3067supabase\u304b\u3089\u578b\u3092\u7d10\u3065\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u975e\u540c\u671f\u306e\u64cd\u4f5c\u306e\u5b9f\u884c\u3092\u4e00\u6642\u505c\u6b62\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308bPromise\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002setTimeout \u95a2\u6570\u306f\u3001\u6307\u5b9a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2784","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2784"}],"version-history":[{"count":2,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2784\/revisions"}],"predecessor-version":[{"id":2788,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2784\/revisions\/2788"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}