Hi, I am new to web development, Meteor and node and I’m trying to use the Meteor.npmRequire function. The examples shown in the official read me (https://github.com/meteorhacks/npm#readme) have the declaration of
var GithubApi = Meteor.npmRequire(‘github’);
inside a function, which is inside Meteor.methods in the server side code. If I need to use GithubApi multiple times across different server side functions, do I need to declare it like this every time, or is there somewhere that I can declare GithubApi globally on the server side and re-use it?
Any other tips on best practice on how to include/require node packages would be much appreciated.
Thanks for the help and apologies for the newbie question