node-eos
eos(https://github.com/ulyn/eos) client for node.js
This module has been tested to work with eos version 2.1.0.
Installation
You can install it using npm:
$ npm install node-eos
How to use
(1) init eos :
var eos = ; eos;
(2) definde a eos service,you can use eos-uddi to generate it
module{ { eosService; thisappId = "test"; thisserviceId = "testType"; thisserviceVersion = "1.3"; } eosutil; testTypeprototype{ var req = this; eos; } testTypeprototypetestMapparamKey = "map""str"; return testType; }
(3) call service
var testType = eos; ;
document
Filter
mock config file
config_mock.js
module.exports = {
mock:{
"testType":{
"testMap":""//a
}
},
offlineData:{
"testType":{
"testMap":{
"a":"a"
}
}
}
}
Exception
the errorFunc params
- getMessage
- getCode
- getName
notes
-
please ensure that the eos is loaded only once