Create Collection
Collection Creation Parameters
The createCollection method supports the following format:
createCollection(name: string);
Below is an example of creating a collection.
Create a Collection
javascript
1
2const { AxioDB } = require("axiodb");3
4const db = new AxioDB();5const myDB = await db.createDB("MyDatabase");6
7// Create a collection8const collection = await myDB.createCollection("users");9console.log("Collection created:", collection);