loopback-connector-mssql
is the Microsoft SQL Server connector module for loopback-datasource-juggler.
For complete documentation, see StrongLoop Documentation | SQL Server Connector.
npm install loopback-connector-mssql --save
To use it you need loopback-datasource-juggler
.
-
Setup dependencies in
package.json
:{ ... "dependencies": { "loopback-datasource-juggler": "latest", "loopback-connector-mssql": "latest" }, ... }
-
Use:
var DataSource = require('loopback-datasource-juggler').DataSource; var dataSource = new DataSource('mssql', { host: 'demo.strongloop.com', port: 1433, database: 'mydb', username: 'myuser', password: 'mypass' });