Last active
September 13, 2022 10:48
-
-
Save dector/849c1f1baf9e5929fae6f4c395ea388c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Surreal from "https://deno.land/x/surrealdb@v0.2.1/mod.ts" | |
const db = new Surreal('http://localhost:8000/rpc') | |
await db.signin({ user: 'root', pass: 'root' }) | |
await db.use('test', 'test') | |
console.log("Fetching #1") | |
console.log(await db.query(`select * from posts`)) | |
console.log("Fetching #2") | |
console.log(await db.query( | |
`select * | |
from posts` | |
)) | |
console.log("Done") | |
Deno.exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment