description |
---|
How-to create a database using the TerminusDB JavaScript Client |
To create a database with an already connected client, you can write:
const createNewDB = async () => {
try {
await client.createDatabase('ExampleDatabase', {
label: "ExampleDatabase",
comment: "Created new ExampleDatabase",
schema: true
});
console.log("Database created Successfully!")
} catch (err) {
console.error(err)
}
};
After the database is created the client will be connected to it.
{% hint style="info" %} Try out the Getting Started with the TerminusDB JavaScript Client five-part tutorial to get to grips with it. {% endhint %}