Thursday, 25 May 2017

How to connect with squirrel in node js

I am totally new to nodejs and squirrel both.I am trying to make a connection with squirrel having some tables in it through node js. I achieved to connect with mysql previously. But now my connction code is not working for squirrel

Here is my code:

var squirrel = require('C:/My Data/Nodejs/BackUps/Db_Connection_code Squirrel/node_modules/squirrel');
var pool = squirrel.createPool({
    host : 'myconnectionString',
    user : '****',
    password : '****',
    database : 'demo'
});

When I am trying to run the code, I am getting this on my command prompt as below.

var pool = squirrel.createPool({
TypeError: squirrel.createPool is not a function

P.S: I already done npm install squirrel and also var squirrel = require('squirrel'); in node js.

Any help appreciated



via Nyki

No comments:

Post a Comment