FeedHenry Welcome Cloud App
Cloud template app for the Welcome project. It listens for FeedHenry SDK cloud calls, stores data using MongoDB and provides location based weather data using a third party API.
Weather data setup
In order to use the location based weather functionality within the app you will need a valid API key for the worldweatheronline.com service. An API key can be acquired here.
When you have a valid API key, add it to lib/weather.js:
// PLEASE ADD YOUR OWN API_KEY FOR http://developer.worldweatheronline.com var API_KEY = "yourNewKey";
In order to run the Welcome server locally you'll need to have MongoDB installed and running on your local machine.
Start MongoDB server with:
By default, the Welcome server will try to access MongoDB on port
27017, if you are running MongoDB on a different port you should set the
FH_MONGODB_CONN_URL environment variable to the MongoDB connection URL.
In order to run the Welcome server locally you'll need to have Redis installed and running on your local machine.
Start Redis server with:
Start the server
The Welcome server will be availble at
If you wish to run the server on a different port you should set the
environment variable to the port you want the server to run on.
See Cloud Development page about how to develop cloud app.
All the tests are in the "test/" directory. The cloud app is using mocha as the test runner.
- all the tests:
- unit tests:
npm run unit
- acceptance tests:
npm run accept
- coverage report:
npm run coverage
- coverage report for unit tests:
npm run coverage-unit
- coverage report for acceptance tests:
npm run coverage-accept
Source code analysis
npm run analysis