The IBM Watson™ Tone Analyzer for Customer Engagement.
You need a Bluemix account. If you don't have one, [sign up][sign_up]. Experimental Watson Services are free to use.
Download and install the [Cloud-foundry CLI][cloud_foundry] tool if you haven't already.
manifest.ymlfile and change
<application-name>to something unique. The name you use determines the URL of your application. For example,
applications: - services: - my-service-instance name: <application-name> command: npm start path: . memory: 512M
- Connect to Bluemix with the command line tool.
cf api https://api.ng.bluemix.net cf login
- 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
- Create a
.envfile in the root directory by copying the sample
.env.examplefile using the following command:
cp .env.example .env
You will update the
.env with the information you retrieved in steps 5 and 6
.env file will look something like the following:
- Install the dependencies you application need:
- Start the application locally:
Point your browser to http://localhost:3000.
Optional: Push the application to Bluemix:
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].
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.
. ├── 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
This sample code is licensed under Apache 2.0.
Open Source @ IBM
Find more open source projects on the IBM Github Page