Portfolio Endpoints
Initial Set Up
- Create a Node.js runtime
- Add the custom "Company Lookup" API
- Add the custom "Stock Price" API
- Add the custom "Stock News" API
- Add the custom "Stock History" API
- Add the custom "Stock Sentiment" API
- Add the custom "Stock Tweets" API
- Add the "IBM Globalization" service
Running Locally
To run locally, create a VCAP_SERVICES.json
file that is identical to your
deployed environment variables. For example:
{
"Company Lookup v1 : Sandbox 55e768c90cf2722940e66db9 prod": [
{
"name": "CompanyLookup",
"label": "Company Lookup v1 : Sandbox 55e768c90cf2722940e66db9 prod",
"plan": "Basic Stock Services v1 : Sandbox prod",
"credentials": {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"url": "your_client_url"
}
}
],
"Stock Price v1 : Sandbox prod": [
{
"name": "StockPrice",
"label": "Stock Price v1 : Sandbox prod",
"plan": "Basic Stock Services v1 : Sandbox prod",
"credentials": {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"url": "your_client_url"
}
}
],
...
}
Where the ...
represents the JSON for Stock News
, Stock History
, and
Stock Sentiment
.
Then you only need to run:
npm install
npm run start