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.
To learn about the methods available for executing queries and retrieving their answers using Driver NodeJS, refer to the API Reference.
Node.js version 14 or above is recommended.
npm install typedb-driver
Further documentation: https://typedb.com/docs/drivers/nodejs/overview
typedb-driver
is a TypeScript project and provides its own type definitions out of the box - for example:
import { EntityType } from 'typedb-driver';
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);
npm
package manager;yarn
package manager. - Clone the project and run
yarn
at the root directory (containingpackage.json
) - Run
yarn run build
- The JavaScript files, and their matching TypeScript type definitions are compiled to the
dist
directory.
Note: TypeDB Driver can be run without TypeScript, however its type assertions may make development smoother.