Skip to content
v2.7

First call

Install the SDK, connect to the project and read a table.

On this page you install the SDK, connect your app to the project and read the first rows of a table. It takes about five minutes.

  1. Create a project

    In the console, go to Projects › Create project. Write down the project ID.

  2. Register the platform

    In Overview › Platforms, add your app’s domain (for example, localhost). Requests from other origins are rejected.

  3. Create a table

    In Databases, create the loja-principal database and the produtos table with a nome column.

For browser apps, use @owbase/web. On the server, use @owbase/node with an API key.

main.ts
import { Client, TablesDB, Query } from "@owbase/web";
const client = new Client()
.setEndpoint("https://cloud.owbase.dev/v1")
.setProject("loja-aurora");
const db = new TablesDB(client);
const { rows, total } = await db.listRows({
databaseId: "loja-principal",
tableId: "produtos",
queries: [Query.limit(10)]
});
console.log(total, rows[0]);

Add login with Accounts and sessions, set who can read each row in Permissions and upload files with Storage.

Was this page helpful?