I’m using the structure from Meteor guides and I have this:
/imports/api/github.js
With:
var GitHubApi = require('github');
var Github = new GitHubApi({
// required
version: "3.0.0",
// optional
debug: true,
protocol: "https",
host: "api.github.com", // should be api.github.com for GitHub
timeout: 5000,
headers: {
"user-agent": "P" // GitHub is happy with a unique user agent
}
});
export default Github;
Then in registerApi.js
I import it
import '../../api/github.js';
And just as a test in meteor shell
I do:
> import Github from '/imports/api/github.js';
> Github
ReferenceError: Github is not defined
What am I doing wrong?