typedb-driver
v2.29.2
Published
TypeDB Node.js Driver
Readme
TypeDB Node.js Driver
Driver Architecture
To learn about the mechanism that a TypeDB Driver uses to set up communication with databases running on the TypeDB Server, refer to the Clients Overview.
API Reference
To learn about the methods available for executing queries and retrieving their answers using Driver NodeJS, refer to the API Reference.
Installation
Node.js version 14 or above is recommended.
npm install typedb-driverFurther documentation: https://typedb.com/docs/drivers/nodejs/overview
Using TypeScript
typedb-driver is a TypeScript project and provides its own type definitions out of the box - for example:
import { EntityType } from 'typedb-driver';Build TypeDB Driver for Node.js from Source
Note: You don't need to compile TypeDB Driver from source if you just want to use it in your code. See the "Import TypeDB Driver for Node.js" section above.
We recommend using
yarn, see https://yarnpkg.com/ for information aboutyarn.
- Make sure you have the following installed: Node.js (version 14 or above);
npmpackage manager;yarnpackage manager. - Clone the project and run
yarnat the root directory (containingpackage.json) - Run
yarn run build - The JavaScript files, and their matching TypeScript type definitions are compiled to the
distdirectory.
Note: TypeDB Driver can be run without TypeScript, however its type assertions may make development smoother.
