Friday, April 12, 2019

Code Snippet : Windows NTLM POST using Node JS

Be The First To Comment
let ntlm = require('request-ntlm-lite');

let postData = 'user=test';   //anything

let headers = {'Content-Type': 'application/x-www-form-urlencoded'};

let ntlmOptions = {                 
url: 'postUrl',
username: 'username',
password: 'password',
rejectUnauthorized: false, //disable ssl certificate error
ntlm_domain: 'domain_name',
json: true,
};, postData, function(error, response, body){

Database Configuration to connect with named instance SQL Server with mssql for node.js

Be The First To Comment
After some frustration, it found that Node JS mssql (5.0.5) doesn't like instance name in config file to make mssql.ConnectionPool(config)-


    dbConfig: {
        "user": "user",
        "password": "pass",
        "server": "myserver",  //  Without instance name 
        "database": "dbname",
        "driver": "tedious",
        "options": {
            "trustedConnection": true

Doesn't Work


© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me