GithubHelp home page GithubHelp logo

journeycustomcomponent's Introduction

ODA Component Package

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

Generated by @oracle/bots-node-sdk on Thu Dec 02 2021

Structure

.
├── .npmignore
├── components
│   └── ...
├── main.js
├── package.json
├── Dockerfile
├── docker-compose.yml
└── 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
Dockerfile Configuration file to create docker image
docker-compose.yml Configuration file for docker deployment
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

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:

# 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/helloWorld

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

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.

Run the following commands to deploy to docker and start the container:

npm run-script docker-build
docker-compose up

journeycustomcomponent's People

Contributors

jkolden avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.