Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

FirebaseExtended/codelab-dataconnect-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a sample app for the preview version of the Firebase DataConnect.This service is currently in Private Preview at no cost for a limited time. Sign up for the program atFirebase Data Connect.This quickstart will not work if you don't have access to the preview.

Getting Started with Firebase Data Connect


Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions, check out theofficial documentation.

1. Create a New Data Connect Service and Cloud SQL Instance

  1. OpenFirebase Data Connect in your project in Firebase Console and select Get Started.
  2. Create a new Data Connect service and a Cloud SQL instance. Ensure the Blaze plan is active. Pricing details can be found atFirebase Pricing.
  3. Select your server region, if you wish to use vector search, make sure to selectus-central1 region.
  4. Allow some time for the Cloud SQL instance to be provisioned. After it's provisioned, the instance can be managed in theCloud Console.

2. Set Up Firebase CLI

Ensure the Firebase CLI is installed and up to date:

npm install -g firebase-tools

3. Cloning the repository

This repository contains the quickstart to get started with the functionalities of Data Connect.

  1. Clone this repository to your local machine.
  2. Initialize your Firebase project withfirebase init dataconnect. Overwrite only dataconnect.yaml when prompted, do not overwrite any other dataconnect files.(Optional): If you intend on using other Firebase features, runfirebase init instead, and select both DataConnect options as well as any feature you intend to use.
  3. Replace variables in.env with your project-specific values.
  4. Allow domains for Firebase Auth in yourproject console (e.g.http://127.0.0.1).

4. Running queries and mutations in VS Code

The VSCode Firebase Extension allows you to generate Firebase Data Connect SDK code, run queries/mutations, and deploy Firebase Data Connect with a click. Alternatively, see below for CLI commands.

  1. InstallVS Code.
  2. Download theFirebase extension andinstall it.
  3. Open this quickstart in VS code, and in the left pane of the Firebase extension, and log in with your Firebase account.(Optional): If your Firebase project was not initialized in the last section, you can clickRun firebase init and selectData Connect to initialize.
  4. Click on deploy to deploy your schema to your cloud SQL instance. Or runfirebase deploy --only dataconnect (this will also activate vectors search if it's enabled in the schema).
  5. Running the VSCode extension should automatically start the DataConnect emulators. If you see an emulators error, try runningfirebase emulators:start dataconnect manually.

Now you should be able to deploy your schema, run mutations/queries, generate SDK code, and view your application locally.

5. Populating the database

  1. Run1_movie_insert.gql,2_actor_insert.gql,3_movie_actor_insert.gql, and4_user_favorites_review_insert.gql files in the./dataconnect directory in order using the VS code extension,

6. Running the app

  1. cd into the src folder, and runnpm run dev to start the localhost web app.(Optional): To use the Firebase Auth emulator, runfirebase emulators:start and uncomment theconnectAuthEmulator function inapp/src/lib/firebase.ts.

License

© Google, 2024. Licensed under anApache-2 license.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp