Skip to content

The official TypeScript/JS client library for EdgeDB

License

Notifications You must be signed in to change notification settings

NikolasMelui/edgedb-js

 
 

Repository files navigation

The official Node.js client library for EdgeDB

Build Status NPM Join GitHub discussions

edgedb is the official EdgeDB driver for JavaScript and TypeScript.

The library requires NodeJS 10 or later.

Installation

npm install edgedb
# or
yarn add edgedb

Quickstart

First, go through the EdgeDB Quickstart to install EdgeDB and set up your first EdgeDB project.

Now in your project directory, install the "edgedb" library:

npm init

npm install edgedb

And here's a simple script to connect to your EdgeDB instance and run a simple query:

const edgedb = require("edgedb");

async function main() {
  const client = edgedb.createClient();

  console.log(
    await client.querySingle(
      `SELECT re_replace('World', 'EdgeDB', 'Hello World!')`
    )
  );
}

main();

Development

A local installation of EdgeDB is required to run tests. Download EdgeDB from here or build it manually.

$ git clone [email protected]:edgedb/edgedb-js.git
$ cd edgedb-js
$ yarn              # install dependencies
$ yarn build        # compile TypeScript
$ yarn tests        # run tests

License

edgedb-js is developed and distributed under the Apache 2.0 license.

About

The official TypeScript/JS client library for EdgeDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Other 1.0%