Global

Methods

init(app, optionsopt) → {external:ExpressApplication}

Source:
Primary bot application initialization function used to prepare the application for bot message handling. Unless the parser option is explicitly false, this function requires express and body-parser.
Example
const express = require('express');
const OracleBot = require('@oracle/bots-node-sdk');

const app = express();
OracleBot.init(app, {
  // options...
});
Parameters:
Name Type Attributes Description
app external:ExpressApplication Express application reference.
options Object <optional>
Configuration options.
Properties
Name Type Attributes Default Description
logger CustomLogger <optional>
console Specify alternate logging utility
parser ParserOptions <optional>
Body parser middleware options.
Returns:
- Initialized application
Type
external:ExpressApplication