Skip to content

Commit

Permalink
Docs: Update Nodejs sdk examples (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian-Hackenberg authored Mar 5, 2024
1 parent bf49643 commit b12998a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions versioned_docs/version-1.2.x/integration/sdks/nodejs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ async function main() {

// Signin as a namespace, database, or root user
await db.signin({
user: 'root',
pass: 'root',
username: 'root',
password: 'root',
});

// Select a specific namespace / database
Expand Down Expand Up @@ -492,23 +492,23 @@ async db.signin({ ... })
```ts
// Authenticate with a root user
const token = await db.signin({
user: 'root',
pass: 'surrealdb',
username: 'root',
password: 'surrealdb',
});

// Authenticate with a Namespace user
const token = await db.signin({
ns: 'surrealdb',
user: 'tobie',
pass: 'surrealdb',
username: 'tobie',
password: 'surrealdb',
});

// Authenticate with a Database user
const token = await db.signin({
ns: 'surrealdb',
db: 'docs',
user: 'tobie',
pass: 'surrealdb',
username: 'tobie',
password: 'surrealdb',
});

// Authenticate with a Scope user
Expand Down Expand Up @@ -1151,4 +1151,4 @@ This function will run the following query in the database:

```surql
DELETE * FROM $thing;
```
```

0 comments on commit b12998a

Please sign in to comment.