Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to add backend module written node.js, How do I do? #71

Open
AntonioCatanese opened this issue Jan 30, 2018 · 0 comments
Open

I want to add backend module written node.js, How do I do? #71

AntonioCatanese opened this issue Jan 30, 2018 · 0 comments

Comments

@AntonioCatanese
Copy link

AntonioCatanese commented Jan 30, 2018

Thank you for offering this useful source.
I am new in Angular JS full.
I want to show real time cryptocurrency data updating every 5 seconds, where do I add the back-end file or code?
Now there is 2 files to be connected.


callAPI.js

var IR = require('./backend/index');
var publicClient = new IR();
// get ticker for BTC-USD
publicClient.getMarketSummary("Xbt", "Usd", console.log);



myAPIs.js

var util = require('../node_modules/util'),
_ = require('../node_modules/underscore'),
request = require('../node_modules/request'),
//crypto = require('../node_modules/crypto'),
cheerio = require('../node_modules/cheerio'),
VError = require('../node_modules/verror');
IndependentReserve.prototype.getMarketSummary = function getMarketSummary(primaryCurrencyCode, secondaryCurrencyCode, callback)
{
this.getRequest('getMarketSummary', callback, {
primaryCurrencyCode: primaryCurrencyCode,
secondaryCurrencyCode: secondaryCurrencyCode}
);
//Get data from the exchange's offical API. 'https://api.independentreserve.com'
};

After all my questions are following :

  1. Where do I add callAPI.js or its contents?
    Do I need to something to gruntfile.js?

  2. How do I connect the result data to view controller?

  3. How do I implement auto data refresh every 5 seconds?

Regards.
Antonio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant