Customer Engagement Tone analyzer demo
JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
public
test
views Update analytics (#23) May 18, 2018
.cfignore
.editorconfig
.env.example
.eslintignore
.eslintrc
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
Procfile
README.md
app.js
casper-runner.js
manifest.yml
package-lock.json refactor(compile): Remove cf-deployment-tracker May 20, 2018
package.json
server.js
user-feedback.js

README.md

Customer Care Demo Build Status

The IBM Watson™ Tone Analyzer for Customer Engagement.

Getting started

  1. You need a Bluemix account. If you don't have one, [sign up][sign_up]. Experimental Watson Services are free to use.

  2. Download and install the [Cloud-foundry CLI][cloud_foundry] tool if you haven't already.

  3. Edit the manifest.yml file and change <application-name> to something unique. The name you use determines the URL of your application. For example, <application-name>.mybluemix.net.

applications:
- services:
  - my-service-instance
  name: <application-name>
  command: npm start
  path: .
  memory: 512M
  1. Connect to Bluemix with the command line tool.
cf api https://api.ng.bluemix.net
cf login
  1. Create and retrieve service keys to access the [Tone Analyzer][service_url] service:
cf create-service tone_analyzer standard my-ta-service
cf create-service-key my-ta-service myKey
cf service-key my-ta-service myKey
  1. Create a .env file in the root directory by copying the sample .env.example file using the following command:
cp .env.example .env

You will update the .env with the information you retrieved in steps 5 and 6

The .env file will look something like the following:

TONE_ANALYZER_USERNAME=<username>
TONE_ANALYZER_PASSWORD=<password>
  1. Install the dependencies you application need:
npm install
  1. Start the application locally:
npm start
  1. Point your browser to http://localhost:3000.

  2. Optional: Push the application to Bluemix:

cf push

After completing the steps above, you are ready to test your application. Start a browser and enter the URL of your application.

        <your application name>.mybluemix.net

For more details about developing applications that use Watson Developer Cloud services in Bluemix, see [Getting started with Watson Developer Cloud and Bluemix][getting_started].

Troubleshooting

  • The main source of troubleshooting and recovery information is the Bluemix log. To view the log, run the following command:

    cf logs <application-name> --recent
  • For more details about the service, see the [documentation][docs] for the Tone Analyzer Service.


Directory structure

.
├── app.js                      // express routes
├── config                      // express configuration
│   ├── error-handler.js
│   ├── express.js
│   └── security.js
├── manifest.yml
├── package.json
├── public                      // static resources
├── server.js                   // entry point
├── test                        // unit tests
└── views                       // react components

License

This sample code is licensed under Apache 2.0.

Contributing

See CONTRIBUTING.

Open Source @ IBM

Find more open source projects on the IBM Github Page