Run the service module locally
Run the service module locally and host the api doc
Run the service module locally and watch local file change to reload automatically
Build the module to /dist folder. It will be used to publish to npm, and can be used in other express server
Build the api document page
Run the tests on the service ...
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'
}));
- 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 |
---|---|
https://api.ng.bluemix.net | US South |
https://api.eu-gb.bluemix.net | United Kingdom |
https://api.au-syd.bluemix.net | Sydney |
- Log in to your Bluemix account.
cf login
- From within the app directory, push the app to Bluemix.
cf push