@abku/d1
v1.0.2
Published
A package that allow you to connect with Cloudflare D1.
Downloads
13
Maintainers
Readme
@abku/d1
A simple package that allows you to connect with Cloudflare D1 and run queries.
Usage
import { d1 } from "@abku/d1";
const d1 = new d1(account_id, token, database_id);
async main(){
const response = await d1.listDatabase();
console.log(response)
}
main()
Methods
d1.query('SQL QUERY HERE');
d1.createDatabase('database-name');
d1.deleteDatabase('database-id');
d1.getDatabase('database-id');
d1.listDatabase();
Please make sure you setup token. docs.
Need Help? Join discord server.