-
Notifications
You must be signed in to change notification settings - Fork 0
libsqlServerCompatCheck
Person edited this page Nov 11, 2023
·
4 revisions
This function checks if the server supports Hrana HTTP API v3
.
async function libsqlServerCompatCheck(conf: libsqlConfig): Promise<libsqlResult<null, null>>
-
conf
of typelibsqlConfig
Promise<libsqlResult<null, null>>
Reference: libsqlResult
import { libsqlServerCompatCheck } from "libsql-stateless"; //for mjs
//or
const { libsqlServerCompatCheck } = require("libsql-stateless"); //for cjs
const res = await libsqlServerCompatCheck(conf.db_url);
if (res.isOk) {
console.log("Server is OK");
} else {
console.error("Server is not OK"); //try updating your server
}