Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

surrealdb.node

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

surrealdb.node

Node.js driver for SurrealDB

  • 1.0.0-beta.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-33.33%
Maintainers
0
Weekly downloads
 
Created
Source

 

A Node.js engine for the SurrealDB JavaScript SDK.


   

     

surrealdb.node

A Node.js engine for the SurrealDB JavaScript SDK.

This library is a plugin for the SurrealDB JavaScript SDK, which can be used to run SurrealDB as an embedded database within a Node.js server side environment.

It enables SurrealDB to be run in-memory, or to persist data by running on top of SurrealKV. It allows for a consistent JavaScript and TypeScript API when using the surrealdb.js library by adding support for embedded storage engines (memory, surrealkv) alongside the remote connection protocols (http, https, ws, wss).

Example usage

import { Surreal } from 'surrealdb.js';
import { surrealdbNodeEngines } from 'surrealdb.node';

// Enable the WebAssembly engines
const db = new Surreal({
    engines: surrealdbNodeEngines(),
});

// Now we can start SurrealDB as an in-memory database
await db.connect("mem://");
// Or we can start a persisted SurrealKV database
await db.connect("surrealkv://demo");

// Now use the JavaScript SDK as normal.

FAQs

Package last updated on 26 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc