@textile/hub > Client > newDB
Client.newDB() method
newDB creates a new store on the remote node.
Signature:
newDB(threadID?: ThreadID, name?: string): Promise<ThreadID>;
Parameters
Parameter | Type | Description |
---|---|---|
threadID | ThreadID | the ID of the database |
name | string | The human-readable name for the database |
Returns:
Promise<ThreadID>
Example
import {Client, ThreadID} from '@textile/hub'
async function createDB (client: Client) {
const threadID: ThreadID = await client.newDB()
return threadID
}