UNPKG

md_nosql_db_sdk

Version:

sdk for communicating to the nosql server

42 lines (31 loc) 747 B
export class connector{ constructor(dbUrl, apiKey, apiPass){ this.dbUrl = dbUrl ? dbUrl : false this.apiKey = apiKey ? apiKey : false this.apiPass = apiPass ? apiPass : false //Check values for(setting in this){ if(this[setting] == false){ return false } } } executeCommand(){ const https = require('https'); var options = { host: this.dbUrl, port: 443, method: 'POST', headers: { 'Content-Type': 'application/json' } }; https.get(options, res => { let data = []; res.on('data', chunk => { data.push(chunk); }); res.on('end', () => { }); }).on('error', err => { }); } }