Skip to content

(priv) Learn and Discover why NoSQL Cloud Services and OCI native services are compelling

Notifications You must be signed in to change notification settings

dario-vega/botnosql

Repository files navigation

botnosql

This project is in format of a Component Package. Component Packages are the recommended way to organize Bots Custom Components code and allow the custom component code to be more portable to different runtime environments.

Generated by @oracle/bots-node-sdk on Mon May 18 2020

Structure

.
├── .npmignore
├── components
│   └── ...
├── main.js
├── package.json
└── spec
    └── ...
Description
.npmignore Ignore files when packaging as npm module
components Directory (default) where Component implementations are added
main.js Entrypoint for the Custom Component Package configuration
spec Placeholder for unit test implementations

The Component Package behaves like any other npm project. Directly install any dependencies or tools required to implement the customizations.

Development

With @oracle/bots-node-sdk as a devDependency in a Component Package gives the project some valuable command line functionality.

TIP: Use npm run bots-node-sdk for additional CLI help and usage information.

This component package is ready to run as a local development service. Once the service starts you may use a local tunnel, such as ngrok, and configure an External Service to connect the components to your Skill.

npm start
# or run with additional options
npm run bots-node-sdk -- service .
# or run with debugger
node --inspect $(npm bin)/bots-node-sdk service .

With custom component services running, test endpoints like so: ⚠️DO not use those test - not IMPLEMENTED

# get component metadata
curl -X GET localhost:3000/components

# invoke custom component
curl -H "Content-Type: application/json" -d @./spec/test.cc.req.json localhost:3000/components/getByConfirmationCode

# invoke resolve entity event handler component
curl -H "Content-Type: application/json" -d @./spec/test.eh.req.json localhost:3000/components/resolveentities/getByConfirmationCode

Deployment

As this package is designed to be installed and run with a corresponding service wrapper, run npm pack and upload the resulting .tgz as a package for the Embedded Container service.

npm pack
# or validate and package with the @oracle/bots-node-sdk command line
npm run bots-node-sdk -- pack .

TIP: use npm run bots-node-sdk -- pack --help for additional packaging options.

About

(priv) Learn and Discover why NoSQL Cloud Services and OCI native services are compelling

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published