並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 30 件 / 30件

新着順 人気順

routesの検索結果1 - 30 件 / 30件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

routesに関するエントリは30件あります。 techfeednext.jsAPI などが関連タグです。 人気エントリには 『Next.js API Routes に Zod を組み込む』などがあります。
  • Next.js API Routes に Zod を組み込む

    バリデーションライブラリである Zod を、Next.js で活用する TIPS の紹介です。筆者が Zod を知り・使い始めたのは、React Hook Form のリゾルバーがきっかけです。ブラウザでバリデーションを行うので、不正な入力値検証を API リクエストが発生する前に実行できます。 この Zod はフロントだけではなく、サーバープロセスでも使用できます。例えば、tRPC・Zodiosなどに見られるように、サーバーへのリクエスト(入力値)を検証しつつ型推論も解決してくれるソリューションとして注目されています。 Next.js API Routes に Zod を組み込む Next.js には REST API の実装手段として、API Routes が提供されています。しかし、reqに含まれる入力値検証は自前で用意する必要があります。この入力値検証に Zod を使用されている方

      Next.js API Routes に Zod を組み込む
    • Next.js の API Routes から SWR の型推論を導く

      ファイルシステム 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を実行してお試しください。 サンプルで実現している型推論概要 は

        Next.js の API Routes から SWR の型推論を導く
      • Lazy Load Routes in Vue with webpack Dynamic Comments | CSS-Tricks

        The way routing works in JavaScript is usually that you specify which relative URL pattern you want for which component to render. So for /about you want the <About /> component to render. Let’s take a look at how to do this in Vue/Vue Router with lazy loading, and do it as cleanly as possible. I use this little tip all the time in my own work. A repo that includes everything covered in this post

          Lazy Load Routes in Vue with webpack Dynamic Comments | CSS-Tricks
        • Testing Next.js - getServerSideProps & API Routes -

          Next.js の getServerSideProps & API Routes テスト手法についてまとめました。getServerSidePorps & API Routes に関するテストは「Cypress・Playwright」を利用することが多いと思いますが、本稿は Jest 単体テストの紹介です。以下はテストに使用するエコシステム一式です(Jest 等は略) msw node-mocks-http next-test-api-route-handler testing-library 1.pageExtensions を設定する 本題に入る前に、pageExtensions を next.config.jsに設定します。pageExtensions はpagesに含まれるファイルのうち、指定の拡張子をもつファイルが「Page・API 実装ファイルである」ことを指定するものです。

            Testing Next.js - getServerSideProps & API Routes -
          • Next.jsのAPI Routesを中間APIとして使う方法

            全体の概要 基本的なAPI結合 基本的にはフロント(Next.js)からaxios等を利用して、サーバー側のAPIエンドポイントに対して直接リクエストを送る構成かと思います。 今回紹介するNext.jsのAPI Routesを中間APIとして挟んだ場合 今回紹介する構成は下記のようになっています。 この構成にするメリット・デメリットは後の章で解説をしていきます。 この記事の対象者 フロントエンド初級者から中級者 Next.jsのAPI Routesの基本を学びたい人 セキュリティーを考慮したAPI通信手法について知りたい人 Next.jsのAPI Routesを中間APIとして挟むメリット セキュリティーが強化できる ログの管理ができる APIエンドポイントの抽象化 セキュリティーが強化できる Next API Routesを中間APIとして挟むことで、外部から直接本体のAPIにアクセスさ

              Next.jsのAPI Routesを中間APIとして使う方法
            • Next.js の Interception Routes について

              Next.js の Interception Routes について 2023.04.09 Intercepting routes は Next.js 13.3 から追加された機能で、App Router(app ディレクトリ)において使用できます。Intercepting routes ではブラウザの URL を遷移先のものに上書きしつつ、現在のレイアウトに新しいページを表示できます。これは例えば Instagram のように、ユーザーのプロフィールから写真をクリックすると、写真をモーダルを開き、ページを更新したり共通したりするとデフォルトのレイアウトで表示する場合などに便利です。 Intercepting routes は Next.js 13.3 から追加された機能で、App Router(app ディレクトリ)において使用できます。 Intercepting routes ではブラ

                Next.js の Interception Routes について
              • routes.rbに色々なルーティングを定義したRailsアプリを作ってみた - メモ的な思考的な

                先日 Railroads という、Rails開発向けのIntelliJ Platform Pluginを作りました。 RubyMine 2023.3系から、rails routes を便利に扱える Railways プラグインが動かなくなったので、代替プラグイン Railroads を作りました - メモ的な思考的な そのプラグインの動作確認をするために rails routes を実行し、設定したルーティグがどのように表示されるか確認 rails routes の結果を元に、Railroadsプラグインでコントローラとメソッドが表示されているか確認 ができるRailsアプリが必要になりました。 そこで、 routes.rb に色々なルーティングを設定したRailsアプリを作ってみたことから、メモを残します。 なお、今回定義したRailsアプリのルーティングについては、 Railroads

                  routes.rbに色々なルーティングを定義したRailsアプリを作ってみた - メモ的な思考的な
                • Powerful route planner that prefers greenery and can generate round trip routes of a specified distance | Trail Router

                  Our routing algorithm prefers paths that go through parks, forests or by water, and avoids busy roads wherever possible. Here's a few things you can do with Trail Router: Automatically plot a round-trip route of a desired distance. Manually create your own point-to-point route that prefers nature. Choose whether you'd prefer routes that involve nature, well-lit streets or a lack of hills.

                  • Next.jsのAPI Routesでどんなことができるのかを理解する | アールエフェクト

                    API RoutesはServerless Functions API Routesに記述したコードはserverless functions(サーバレス)としてデプロイされます。サーバレスという名前からサーバがないというイメージを持つかもしれませんがserverless functionsを利用するとサーバを管理する必要がなくなりserverless functionsを提供するクラウドプロバイダーがサーバを管理してくれます。そのため開発者はserverless functionsに記述するコードの作成のみに集中することができます。またserverless functionsは外部からリクエストがあった場合のみ起動を行い実行して停止するというサイクルを持っているためサーバを常時起動しておく必要はなくリエクストがある回数のみ起動/実行/停止を繰り返すことになります。 Next.jsプロジェ

                      Next.jsのAPI Routesでどんなことができるのかを理解する | アールエフェクト
                    • Next.jsのIntercepting Routesを使ってみた

                      こんにちは、hanetsukiです。 今回は、Next.js v13.3のAppRouterで利用できるようになっているIntercepting Routesを使って、モーダルと詳細画面を別々に作成できるようになりました。 本記事では、実際に作成したサイトを元にIntercepting RoutesとParallel Routesについてお話しします。 今回作ったもの Interceptiong RoutesとParallel Routesの試験用に、簡単なWebサイトを作成しました。 リポジトリも公開しているので、詳細な実装が気になる方はそちらをご覧ください。 主な利用技術 Node.js(v18.18.2) Next.js(v14.0.2) React(v18.2.0) スクリーンショット画面 TOP画面 https://midjourney.tsuki-lab.net/ 詳細モーダル

                        Next.jsのIntercepting Routesを使ってみた
                      • Phylogenetic analyses of the severe acute respiratory syndrome coronavirus 2 reflected the several routes of introduction to Taiwan, the United States, and Japan | arXiv https://arxiv.org/abs/2002.08802

                        Worldwide Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) infection is disrupting in the economy and anxiety of people. The public anxiety has increased the psychological burden on government and healthcare professionals, resulting in a government worker suicide in Japan. The terrified people are asking the government for border measures. However, are border measures possible for this

                        • Routing: API Routes | Next.js

                          API RoutesExamples API Routes Request Helpers API Routes with GraphQL API Routes with REST API Routes with CORS Good to know: If you are using the App Router, you can use Server Components or Route Handlers instead of API Routes. API routes provide a solution to build a public API with Next.js. Any file inside the folder pages/api is mapped to /api/* and will be treated as an API endpoint instead

                            Routing: API Routes | Next.js
                          • 【Next】API Routes と next-connect を使ったフロントエンド爆速開発 - 7839

                            Next.js のカンファレンス Next.js Conf。OGPのチケットがカッコ良すぎて、すごい盛り上がりのようだ。デザインセンスが良すぎる。私もチケット欲しさに、即座に登録した。オンライン開催とのことで、当日が楽しみだ。登録がまだの方は、是非、下記からどうぞ。 nextjs.org ということで、今回は Next.js の便利な機能である「API Routes」を紹介する。API Routes は、Next.jsを使用してAPIを構築することができる機能である。用途は以下が考えられる。 フロントエンド開発のモックサーバーとしての利用 BFF(Backends For Frontends)でAPIサーバーとしての利用 私は現在、モックサーバーとして利用しているが、簡単に構築できる上に、Next.js のフレームワークの中に用意されているのが便利すぎる。バックエンドのAPIを待たずして、

                              【Next】API Routes と next-connect を使ったフロントエンド爆速開発 - 7839
                            • Next.js の API Routes に Apollo Server を立てる

                              Next.js に Apollo Server を立てるまでの備忘録です。 npx create-next-appで Next.js を作成して TypeScript の設定まで完了している前提で書きます。 依存モジュールの追加 Apollo Server の micro(Vercel が開発している非同期 HTTP サーバー)インテグレーションであるapollo-server-microを依存に追加します。

                                Next.js の API Routes に Apollo Server を立てる
                              • GitHub - hashcat/kwprocessor: Advanced keyboard-walk generator with configureable basechars, keymap and routes

                                A few weeks back I was in need of a keyboard-walk generator but none of the options available did satisfy my needs. The main issue starts with the definition of "what is a keyboard-walk". So far it seems everybody has their own definition which in turn leads to incompatibilities when it comes to password cracking. Human generated passwords follow their creators logic, whatever they may be. Those l

                                  GitHub - hashcat/kwprocessor: Advanced keyboard-walk generator with configureable basechars, keymap and routes
                                • Flutter Bottom Navigation Bar with Stateful Nested Routes using GoRouter

                                  One of the most popular UX patterns on mobile is to show a bottom navigation bar with tabs. With this pattern, all the tabs are within the "thumb zone" where they can be easily reached: Thumb zone on mobile devices. Credit: Rosenfield MediaBut how can we implement bottom navigation in a Flutter app? As it turns out, the NavigationBar widget gives us a convenient way of switching between the primar

                                    Flutter Bottom Navigation Bar with Stateful Nested Routes using GoRouter
                                  • DHCPで静的経路の配布 (Classless Static Routes) - Qiita

                                    DHCPでClassless Static Routes option (option 121)を使って静的経路情報をDHCPクライアントに配布すると,Router option (option 3)が無視されてしまいハマったのでその対策の備忘録. この記事の環境 DHCP クライアント: Ubuntu 16.04 DHCP サーバ: CISCO IOS 15.6.3M2(ED) (CISCO1921), isc-dhcpd, dnsmasq そもそもClassless Static Routes option (option 121)とは DHCPサーバからDHCPクライアントに対し,静的ルートを配布できるDHCPの機能.デフォルトゲートウェイのルータに静的経路が入っていれば通常問題ないが,たまにこれがあると便利な時がある.自分が経験したのは下記2つのケース. ケース1: VPNのトンネ

                                      DHCPで静的経路の配布 (Classless Static Routes) - Qiita
                                    • Routing: Intercepting Routes | Next.js

                                      Intercepting RoutesIntercepting routes allows you to load a route from another part of your application within the current layout. This routing paradigm can be useful when you want to display the content of a route without the user switching to a different context. For example, when clicking on a photo in a feed, you can display the photo in a modal, overlaying the feed. In this case, Next.js inte

                                        Routing: Intercepting Routes | Next.js
                                      • Amplify x Next.js の API Routes で AWSクレデンシャル情報を取得してみた | DevelopersIO

                                        こんにちは!DA(データアナリティクス)事業本部 サービスソリューション部の大高です。 Amplify UI の Authenticator で認証をかけたアプリで、 Next.js の API Routes を利用しているときに「あー、AWSのクレデンシャル情報を利用したいなー!」と思うことはありませんか?私はあります。 例えば、API Routes で aws-sdk を利用して DynamoDB にアクセスするようなケースでは、DynamoDBClientにcredentialsを設定してあげる必要があるので、AWSのクレデンシャル情報が必要になってきます。 今回はこのAWSクレデンシャル情報の取得について書いていきたいと思います。 前提条件 今回試した環境は以下のとおりです。なお、利用している Amplify Hosting の関係でちょっとバージョンが古いです。 next ^11

                                          Amplify x Next.js の API Routes で AWSクレデンシャル情報を取得してみた | DevelopersIO
                                        • AWS Amplify での Next.js API routes | Amazon Web Services

                                          Amazon Web Services ブログ AWS Amplify での Next.js API routes Next.js は人気のある React フレームワークで、React アプリにサーバーサイドレンダリング・静的サイト生成を可能にします。これにより、驚くほど簡単にフルスタック React アプリケーションを構築できます。Next.js は、サーバーサイドレンダリングと静的サイト生成に必要な多くの難しい設定を自動的に処理する点で、Next.js は他のソリューションより開発者に好まれます。また、スタイリング・ルーティング・バンドルなどのビルトインサポートがあります。Next.js アプリは非常にパフォーマンスが高く、検索エンジンに対する最適化がされており、コマンド 1 つでホスティングプロバイダへ簡単にデプロイできます。Next.js は柔軟さ、シンプルさ、機能の豊富さにより

                                            AWS Amplify での Next.js API routes | Amazon Web Services
                                          • Building a GraphQL server in Next.js via API routes - LogRocket Blog

                                            Leigh Halliday Leigh Halliday is a developer based out of Canada who works at FlipGive. He writes about React and Ruby on his blog and publishes React tutorials on YouTube. Editor’s Note: This post was updated on 14 May 2021 to reflect updated information and new code using TypeScript to add type safety and with DataLoader to avoid N+1s, using Prisma instead of Knex for the database layer, and inc

                                              Building a GraphQL server in Next.js via API routes - LogRocket Blog
                                            • Handling Mounting And Unmounting Of Navigation Routes In React Native — Smashing Magazine

                                              Often you need two different sets of navigation stacks for pre and post user authentication. Usually, to see more content, you have to be authenticated in some way. Let’s look at how to mount and unmount navigation stack based on a met condition in React Native. In this article, we are going to walk through mounting and unmounting of navigation routes in React Native. An expected behavior of your

                                                Handling Mounting And Unmounting Of Navigation Routes In React Native — Smashing Magazine
                                              • SWR + Dynamic Routes in Next.js

                                                Hey folks! If you recently worked with client side data fetching in Next.js, you probably heard of SWR. It comes with useSWR, a React hook that makes all the complicated stuff in client side data fetching (caching, revalidation, focus tracking etc.) easy as pie. You can implement it with just a few lines of code: // Import the hook import useSWR from 'swr' // Define a custom fetcher function const

                                                  SWR + Dynamic Routes in Next.js
                                                • How to Create Dynamic Routes in Next.js

                                                  Add flexibility to your routing with a quick spot of URL inspection. Dynamic routes are pages that allow you to use custom parameters in a URL. They are especially beneficial when creating pages for dynamic content. For a blog, you can use a dynamic route to create URLs based on the titles of the blog posts. This approach is better than creating a page component for each post. You can create dynam

                                                    How to Create Dynamic Routes in Next.js
                                                  • VercelにてNext.jsのAPI RoutesでOGPを作成する 2020年版 - Crieit

                                                    VercelにてNext.jsのAPI Routesでファイルが読み込めるようになっていました! 元々、API Routesでは別のファイルの読み込みができませんでした。そのため下記の記事のように別途node builderを利用していましたが、もうそれも必要なくなり、開発もデプロイもシンプルなAPI Routesとして実行できるようになっているようで、非常に簡単になりました。 Vercel(元ZeitのNow)にてNext.jsでnode-canvasを使ってOGP どういうことか このissueで話が進んでおり、このコメントが解決方法になっています。 Next.js API routes (and pages) should support reading files · Issue #8251 · vercel/next.js つまり、 path.resolve('./public/

                                                      VercelにてNext.jsのAPI RoutesでOGPを作成する 2020年版 - Crieit
                                                    • 【Rails】routes.rb でのpostとpatchは何が違う? - やさしい ぎじゅつ

                                                      Ruby on Railsのroutes.rbではHTTPメソッドを使ってしてroutingを定義することができる。 メソッド 意味 GET リソースの取得 POST 子リソースの作成、リソースへのデータ追加、その他処理 PUT リソースの更新、リソースの作成 DELETE リソースの削除 HEAD リソースのヘッダ (メタデータの取得) OPTIONS リソースがサポートしているメソッドの取得 TRACE プロキシ動作の確認 CONNECT プロキシ動作のトンネル接続への変更 引用元:https://qiita.com/r_fukuma/items/a9e8d18467fe3e04068e ここにはありませんが、routes.rbではこれらのHTTPメソッド + pathでroutingを定義するのですが、ここで問題になるのが... PUT ? POST? PATCH? ということ。例え

                                                        【Rails】routes.rb でのpostとpatchは何が違う? - やさしい ぎじゅつ
                                                      • GitHub - VladimirMikulic/route-list: Beautifully shows Express/Koa/Hapi/Fastify routes in CLI.

                                                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                          GitHub - VladimirMikulic/route-list: Beautifully shows Express/Koa/Hapi/Fastify routes in CLI.
                                                        • Next.jsのAPI Routesで共通のエラーをハンドリングする

                                                          本記事で利用したパッケージのバージョン typescript: 4.5.2 next: 12.0.7 zod: 3.11.6 やりたかったこと API Routes 中の処理で、ルート毎に個別にエラー処理を書きたくない定型的なパターンがあってそれをまとめて catch して処理したかった。 例えば、私の場合は query のバリデーションでした。 具体的には以下のような API ルートがあります。 import { NextApiResponse, NextApiRequest } from "next"; import { z } from "zod"; const querySchema = z.object({ id: z .string() .refine((v) => { return !isNaN(Number(v)); }) .transform((v) => Number(

                                                            Next.jsのAPI Routesで共通のエラーをハンドリングする
                                                          • Calculating Routes at Scale using SQL on BigQuery

                                                            Summary A guide to route optimization using Google BigQuery, a cloud-native & scalable alternative to PgRouting & Network Analyst. This post may describe functionality for an old version of CARTO. Find out about the latest and cloud-native version here. Computing distance metrics is a challenging problem in spatial analysis. When studying urban travel, calculating distances between two locations a

                                                              Calculating Routes at Scale using SQL on BigQuery
                                                            • Routes of Japan

                                                              Route No.069_Road Station Higashiura Bus Terminal, Hyogo

                                                                Routes of Japan
                                                              1

                                                              新着記事