node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



How to run it

npm start

Run the service module locally

npm run start:doc

Run the service module locally and host the api doc

npm run start:watch

Run the service module locally and watch local file change to reload automatically

How to build it

npm run build

Build the module to /dist folder. It will be used to publish to npm, and can be used in other express server

npm run build:doc

Build the api document page

How to test it

npm run test

Run the tests on the service ...

How to integrate this module to Express server

The module exports an express router, you can simply use the following code to integrate it to your express server:

const express = require('express');
const app = express();
const serviceModule = require('dd-cognitive-service-module-ui'); // Note: for now it is not published to npm yet
const rootServicePath = '/api/v1';
app.use(rootServicePath, serviceModule({
  backendUrl: 'http://localhost:3000'

How to deploy app to Bluemix

  1. Run the following command to set your API endpoint, replacing the API-endpoint value with the API endpoint for your region.
cf api <API-endpoint>
API endpoint Region US South United Kingdom Sydney
  1. Log in to your Bluemix account.
cf login
  1. From within the app directory, push the app to Bluemix.
cf push