Search code examples
meteortedious

how to install tedious(npm package) in Meteor for a dummy


I am a dummy who is learning Meteor. I want to create a connection to MS SQL server. I have chosen tedious my issue comes when I want to run the project i get errors, so my thoughts are that I did ont install tedious correctly.

I followed a tutorial http://shiggyenterprises.wordpress.com/2013/03/13/accessing-an-mssql-database-from-meteor/ but it was an old way of doing thing of which he went on http://shiggyenterprises.wordpress.com/2013/04/24/meteor-with-tedious-from-npm/

This new post is incomplete so. Can someone give me a step by step guide How to include a NPM Package like tedious in Meteor.


Solution

  • Tedious is just like any other NPM module. Per http://meteorhacks.com/complete-npm-integration-for-meteor.html, it’s as simple as:

    1. Install Meteorite.
    2. mrt add npm
    3. Create packages.json file on your project root:

      {
        "tedious": "0.2.2"
      }
      
    4. Then in your app, you get access to Tedious via:

      var Tedious = Meteor.require("tedious");
      

    Keep in mind that you won’t have reactivity or a lot of Meteor’s other goodies for anything served from the Tedious-connected database.