Skip to content
Permalink
Browse files
readme add setting demo
  • Loading branch information
hufeng committed Apr 12, 2022
1 parent 4046baf commit d2cbfbeed83686a809c08bd6eb43ed2e8673f5a6
Showing 1 changed file with 14 additions and 1 deletion.
@@ -43,14 +43,27 @@ export default {
}
// =============== dubbo.ts ========================
import { Dubbo } from 'apache-dubbo-consumer'
import { Dubbo, s } from 'apache-dubbo-consumer'
import service from './service'
// dubbo interface setting
const dubboSetting = s.Setting(
s.service(
[
'org.apache.dubbo.demo.DemoProvider',
'org.apache.dubbo.demo.ErrorProvider'
],
{ version: '1.0.0' }
),
s.service('org.apache.dubbo.demo.BasicTypeProvider', { version: '2.0.0' })
)
// create dubbo object
const dubbo = new Dubbo<typeof service>({
application: { name: 'dubbo-js' },
// zookeeper address
register: 'localhost:2181',
dubboSetting,
service
})

0 comments on commit d2cbfbe

Please sign in to comment.