Skip to content

strongloop/loopback.io-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

loopback.io-search

Overview

This repository tracks the code deployed to IBM Cloud Functions to serve as a proxy for Watson Discovery. The endpoint is called by loopback.io.

The proxy is intended to hide Watson Discovery credentials (as the service doesn't offer readonly credentials). The proxy also formats the request as a Watson Discovery query setting the appropriate filter metadata if sidebar value is present in the call.

Deployment

Any changes made to this repository will need to be reflect in IBM Cloud by updating the Function code. Currently deployed to a Node 10 runtime.

Make sure you have Watson Discovery service created on IBM Cloud.

  1. Create a Cloud function in https://cloud.ibm.com/functions/
  2. Go to Parameters tab, set the following parameters:
Parameter Name Parameter Value
discovery_url url in Watson Discovery service credentials
discovery_apikey apikey in Watson Discovery service credentials
  1. Go to Code tab, copy content in search.js in the text area.
  2. Go to Endpoints tab, Make sure the checkbox "Enable as Web Action" is checked. In this case, you'll have a public API.

The Cloud function is set up and ready to run.

Contributions

Contributors

See all contributors.

License

MIT

About

loopback.io Search Cloud Function Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published