This project is a quick start sample developed using Cloud DB JS SDK.
-
On the AppGallery Connect page, create a project and add a web application with named
QuickStartDemo
. -
Click Auth Service on the navigation bar and enable authentication using an anonymous account.
-
Click Cloud DB on the navigation bar and enable database service. Then, perform the following operations:
(1)Create a schema by importing a template file stored in BookInfo.json in the
src/components/config/
directory of the project. Alternatively, create a schema named BookInfo and ensure that all fields must be the same as those insrc/components/model/BookInfo.js
in the project.(2) Create a Cloud DB zone. On the Cloud DB Zone tab page, click Add to create a Cloud DB zone named QuickStartDemo.
-
On the Project Setting page, obtain the app configuration information. Save it to the context object in the
src/components/config/agconnect-services.js
file. -
Integrate the Cloud DB SDK.
Run the following command to install the Cloud DB JavaScript SDK service module in the root directory:
npm install
-
Compiles and hot-reloads for development.
npm run start