You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use with experssjs(static) / harp / socket.io example
create a DBPool instance
varDBDriver=require('noradle-nodejs-client').DBDriver;vardbPool=DBDriver.connect([port,host],{cid : 'client_identifier',passwd : 'password for the client'})
[port,host] is the same parameters as net.connect API
2nd parameter is cid:passwd, to allow noradle dispatcher to accept connection
a servlet only http server with customized ReqBase
in customized ReqBase(a constructor function), set this.name to create or replace name-value pair that's about to send into oracle
some name like "x$xxx" have special meaning, that control the servlet processing behavior, see oraReq-control-headers
functionmyReqBase(req,cfg){// set some name-value pair to oracle, in plsql, r.getc('name1') will get 'value1'this.name1='value1';// map all request to plsql procedure "basic_io_b.req.info"this.x$prog='basic_io_b.req_info';}varDBDriver=require('noradle-nodejs-client').DBDriver,dbPool=DBDriver.connect([8019,'qhtapp1'],{cid : 'demo',passwd : 'demo'}),pspHandler=require('noradle-http')(dbPool,myReqBase),http=require('http');http.createServer(pspHandler).listen(1520);
a servlet only http server with customized config
you can provide none-default configuration (a object type) for noradle.HTTP