You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
424 B
20 lines
424 B
4 weeks ago
|
const libsql = require("@libsql/client")
|
||
|
|
||
|
const create = `
|
||
|
create table if not exists pages (
|
||
|
id integer primary key,
|
||
|
title varchar(255),
|
||
|
description text
|
||
|
)
|
||
|
`
|
||
|
|
||
|
async function initDb() {
|
||
|
const config = {
|
||
|
url: "http://127.0.0.1:8000"
|
||
|
};
|
||
|
const db = libsql.createClient(config);
|
||
|
|
||
|
const cRet = await db.execute(create);
|
||
|
console.log(cRet);
|
||
|
}
|
||
|
initDb()
|