Install

NodeJS or Bun ?

Bun is a modern alternative to Node.js, known for its superior performance, especially in compute-heavy tasks. Since Blocknote makes extensive use of cryptography and compression, we recommend using Bun for optimal speed and efficiency. In fact, our current public dapp (blocknote.spacearrow-up-right) is running on Bun.

Blocknote.js remains fully compatible with both Bun and Node.js.

Install Bun

npm i bun

Or visit https://bun.com/docs/installationarrow-up-right for alternated installations.


Install package

Blocknote is available on https://www.npmjs.com/package/blocknotearrow-up-right

npm i blocknote

The .env file

Before using Blocknote, make sure to edit your .env file. There is an .env.example file into the github repo.

PRIVATE_KEY_AES = "" # Use by the BlocknoteManager
SQLITE_DATABASE_PATH = "./db/"  # Use by the BlocknoteManager
ALGOD_URL = "https://testnet-api.algonode.cloud" 
ALGOD_TOKEN = 
ALGOD_PORT = 
INDEXER_TOKEN = 
INDEXER_PORT = 
INDEXER_URL = "https://testnet-idx.algonode.cloud"

Since Node.js now supports native handling of .env files, Blocknote is not using the dotenv library. To ensure proper functionality, run Node.js with the appropriate argument.

node your-app.js --env-file=.env

or

bun your-app.js --env-file=.env

Last updated