Skip to content

grovelabs/meteor-spark-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated!

This package has been deprecated in favor of using a local package or meteorhacks:npm with the official Spark npm package. Here's how you would do it with a local package in your application:

// packages/npm-deps/package.js
Package.onUse(function(api) {
  Npm.depends({
    spark: '1.0.0',
  });
  
  api.addFiles([
    'npm.js',
  ], 'server');

  api.export([
    'Spark',
  ], 'server');
});
// package/npm-deps/npm.js
Spark = Npm.require('spark');
// server/main.js
Meteor.startup(function(){
  Spark.login({
    username: process.env.SPARK_USERNAME,
    password: process.env.SPARK_PASSWORD,
  })
  .then( function(token) {
    console.log('Logged into Spark:', token);
  })
  .catch( function(err) {
    console.error('Login to Spark failed:', err);
  });
});

Note that if you want to use this on the client, you'll need to provide the client with login information. Do so at your own risk, or figure out how to use access tokens.

About

(DEPRECATED) Spark's npm package wrapped for Meteor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published