Nodeblocks Cloud SDK
Nodeblocks Cloud SDK for creating the custom adapter.
Installation
npm ci
Configuration
We recommend to create the configuration files below by running npm run adapter:dev interactively.
Create nbc.sdk.json file in the root directory and add the following configuration to specify the service and the version of the adapter.
cp nbc.sdk.json.default nbc.sdk.json
{
"adapter":{
"service":"auth|user|organization|catalog|order|review|chat|notification",
"version":"x.x.x"
}
}
Create a .env.${service} file in the root directory and add the following configuration to pass the configs to the service and the adapter.
cp .env.default .env.${service}
ADAPTER_PACKAGE_NAME=`Absolute path to the adapter package`
PORT=8080
NODE_ENV=production
SERVICE_XXXX=`Service configuration (depends on the service)`
...
ADAPTER_XXXX=`Adapter configuration (depends on the service and the adapter)`
...
Usage
Start the development server to develop the custom adapter
npm run adapter:dev
Start the server with the custom adapter
npm start