loopback-connector-mssql
loopback-connector-mssql
is the Microsoft SQL Server connector module for loopback-datasource-juggler.
For complete documentation, see Documentation | SQL Server Connector.
Installation
npm install loopback-connector-mssql --save
Basic use
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', // You need this if using Microsoft Azure SQL database // options: { encrypt: true } });
Running tests
The tests in this repository are mainly integration tests, meaning you will need to run them using our preconfigured test server.
- Ask a core developer for instructions on how to set up test server credentials on your machine
npm test