NodeJS
The following projects are recommended for implementing Node applications using the YugabyteDB YSQL API.
| Project | Type | Support | Examples |
|---|---|---|---|
| node-postgres | Node.JS Driver | Full | Hello World CRUD |
| Sequelize | ORM | Full | Hello World CRUD |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the Hello World examples.
For fully-runnable code snippets and explanations of common operations, see the project page CRUD example. Before running CRUD examples, make sure you have installed the prerequisites.
Prerequisites
To develop Node.js applications for YugabyteDB, you need the following:
-
Node.JS
To download and install Node.js, refer to the Node.js documentation.
To check the version of node, use the following command:node -v -
Create a Node.JS project
Create a file with the.jsextension (for exampleapp.js), which can be run using the following command:node app.js -
YugabyteDB cluster
- Create a free cluster on YugabyteDB Managed. Refer to Create a free cluster. Note that YugabyteDB Managed requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in Install YugabyteDB.