このアプリケーションは、Gemini API から取得した暗号通貨の価格に関するリアルタイムの分析情報をユーザーに提供するように設計された、包括的な暗号通貨ダッシュボードとして機能します。このダッシュボードは、Node.js と Express をベースとするバックエンドと、React を使用して開発されたフロントエンドに分かれています。 バックエンドはポート 5000 で動作し、フロントエンドと Gemini API の間のマネージャーとして機能します。バックエンドの主なコンポーネントは次のとおりです。 - express.json() と express.urlencoded() を使用して、受信したリクエスト本文を解析します。これらは 10 MB の制限で構成されているため、より大きなペイロードとの互換性が確保されています。 - 「cors」ミドルウェアを使用して CORS(クロスオリジン リソース シェアリング)を実装し、フロントエンドからの安全なクロスオリジン リクエストを容易にします。 - Gemini API(https://api.gemini.com/v1/pricefeed)から暗号通貨の価格データを取得する GET エンドポイント(/api/crypto)を定義します。 - Axios を使用して、Gemini API への非同期 HTTP リクエストを行います。これらのリクエストには、環境変数(process.env.GEMINI_API_KEY)として安全に保存されている必須の API キー(X-GEMINI-APIKEY)が含まれています。
構成
ウェブ/Chrome
チーム
By
Nathan
差出人
ニュージーランド
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],[],[],[],null,["# Crypto Dashboard\n\n[More Apps](/competition/vote) \n\nCrypto Dashboard\n================\n\nRetrieve real-time data crypto price to make a dashboard \nVote \nVoted!\nWhat it does\n\nOur application serves as a comprehensive cryptocurrency dashboard, designed to provide users with real-time insights into cryptocurrency prices fetched from the Gemini API. This dashboard is split into a backend powered by Node.js and Express and a frontend developed using React. \nThe backend operates on port 5000 and acts as a mediator between the frontend and the Gemini API. Key components of the backend include: \n- Utilizes \\`express.json()\\` and \\`express.urlencoded()\\` to parse incoming request bodies. These are configured with a limit of 10MB, ensuring compatibility with potentially larger payloads. \n- Implements CORS (Cross-Origin Resource Sharing) using the \\`cors\\` middleware to facilitate secure cross-origin requests from the frontend. \n- Defines a GET endpoint (\\`/api/crypto\\`) responsible for fetching cryptocurrency price data from the Gemini API (\\`https://api.gemini.com/v1/pricefeed\\`). \n- Utilizes Axios for making asynchronous HTTP requests to the Gemini API. These requests include a required API key (\\`X-GEMINI-APIKEY\\`), securely stored as an environment variable (\\`process.env.GEMINI_API_KEY\\`). \nBuilt with\n\n- Web/Chrome \nTeam \nBy\n\nNathan \nFrom\n\nNew Zealand \n[](/competition/vote)"]]