Installation

In this section, you will learn how to install the JavaScript SDK in your project.

Install the SDK

First, install the SurrealDB SDK using your favorite package manager:

    bun install surrealdb

Import the SDK into your project

After installing the SDK as dependency, you can import the SDK into your project. Depending on your setup and environment, we supported multiple options.

import Surreal from 'surrealdb';

Next Steps

After installing the SDK, check out the quick start guide to build your a simple application with the SDK. You can also learn more about carrying out common tasks with the SDK in the following sections: