1

I'm trying to set up a connection between a local SQL Server database I have set up on my computer and a sails project. I cannot get it to work to save my life, it seems there is very little documentation or I'm just not getting it.

I have found this: https://github.com/swelham/sails-mssql and https://github.com/jaredfromsubway/sails-mssql. And have installed npm sails-mssql and replaced the old lib files with the newer ones. I've set up the runner file to match my local SQL Server database. When I run npm test I get nothing.

runner js:

new TestRunner({

    // Load the adapter module.
    adapter: Adapter,

    // ADD YOUR CONFIG HERE
    config: {
        schema: true,
        host: 'computerName/databaseName',
        port: 0,
        user: 'computerName/userName',
        password: 'password',
        database: 'databaseName',
        timeout: 5000,
        pool: {
            min: 0,
            max: 10,
            idleTimeout: 30000
        }
    },

Is there additional documentation somewhere I'm missing? Or is there anyone that could give me some help that has successfully connected with SQL Server? It doesn't seem to be very common. I'd greatly appreciate any help! Thanks.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Trevor
  • 321
  • 2
  • 7
  • 21
  • Note from the future: There exists an officially-supported sails.js SQL Server adapter: https://github.com/cnect/sails-sqlserver – Travis Webb Apr 07 '15 at 01:13

1 Answers1

1

this configuration works for me on 0.10.x

https://gist.github.com/hybrisCole/868f979d8d129247a2da

Hope this is useful!

hybrisCole
  • 74
  • 5
  • Hey thanks. I was using that one as well and kept running across some errors. I ended up having to modify a few lines of code in the adapter js file but now all works well. – Trevor Nov 07 '14 at 16:48