ãã¡ã¤ã«ã·ã¹ãã API Routes ã®èª²é¡ Next.js ã®ãã¡ã¤ã«ã·ã¹ãã ãå©ç¨ãã routing ã¯ãç´æçã«å®ç¾©ã追å ãããã¨ãã§ãã¾ããä¸æ¹ãã¢ã¸ã¥ã¼ã«ã·ã¹ãã 観ç¹ããã¯ééçåç §ããªããããTypeScript ã®åæ¨è«ã¨ç¸æ§ãæªãã§ããNext.js ã«ãããåå®å ¨ãª routing ã½ãªã¥ã¼ã·ã§ã³ã¨ã㦠pathpida ãããã¾ãããAPI Routes ã«ã¯å¯¾å¿ãã¦ãã¾ããã useSWR ãã API Routes ã® API ãå¼ã¶ã·ã¼ã³ã§æå¾ ã«æ²¿ããã®ãè¦å½ãããªãã£ãã®ã§ãä»åèªä½ãã¦ã¿ã¾ããï¼ãªãã¸ããªã¯ãã¡ãï¼æ¬ãµã³ãã«ã§ã¯ãnpm script ã®postinstallã hook ã«ãsrc/types/pages/apiã«çæãã¡ã¤ã«ãåºåãããã®ã§ããããããnpm installãå®è¡ãã¦ã試ããã ããã ãµã³ãã«ã§å®ç¾ãã¦ããåæ¨è«æ¦è¦ ã¯
{{#tags}}- {{label}}
{{/tags}}