fix hello-koa and hello-egg add hello-midway example
diff --git a/examples/hello-egg/.gitignore b/examples/hello-egg/.gitignore
index c039540..38e00e7 100644
--- a/examples/hello-egg/.gitignore
+++ b/examples/hello-egg/.gitignore
@@ -5,6 +5,7 @@
 .idea/
 run/
 logs/
+.github/
 .DS_Store
 .vscode
 *.swp
diff --git a/examples/hello-egg/.travis.yml b/examples/hello-egg/.travis.yml
index 96de8dd..a8bb9d7 100644
--- a/examples/hello-egg/.travis.yml
+++ b/examples/hello-egg/.travis.yml
@@ -1,20 +1,3 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
-sudo: false
 language: node_js
 node_js:
   - '8'
diff --git a/examples/hello-egg/README.md b/examples/hello-egg/README.md
index d9bee3b..e52192d 100644
--- a/examples/hello-egg/README.md
+++ b/examples/hello-egg/README.md
@@ -1,40 +1,17 @@
-# hackernews-async-ts
-
-[Hacker News](https://news.ycombinator.com/) showcase using typescript && egg
-
 ## QuickStart
 
 ### Development
 
 ```bash
-$ npm i
-$ npm run dev
+$ cd ../../
+$ sh start_dubbo_service.sh
+$ cd examples/hello-egg
+$ yarn
+$ yarn interpret
+$ yarn dev
 $ open http://localhost:7001/
 ```
 
-Don't tsc compile at development mode, if you had run `tsc` then you need to `npm run clean` before `npm run dev`.
-
-### Deploy
-
-```bash
-$ npm run tsc
-$ npm start
-```
-
-### Regenerate
-
-```bash
-$ npm run interpret
-```
-
-Note: Install MVN Java node locally;
-
-### Npm Scripts
-
-- Use `npm run lint` to check code style
-- Use `npm test` to run unit test
-- se `npm run clean` to clean compiled js at development mode once
-
 ### Requirement
 
 - Node.js 8.x
diff --git a/examples/hello-egg/app/controller/home.ts b/examples/hello-egg/app/controller/home.ts
index d2b482f..c6d3144 100644
--- a/examples/hello-egg/app/controller/home.ts
+++ b/examples/hello-egg/app/controller/home.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {java} from 'dubbo-js';
+import {java} from 'apache-dubbo-js';
 import {Controller} from 'egg';
 import {Sex} from '../dubbo/providers/org/apache/dubbo/demo/Sex';
 import {TypeRequest} from '../dubbo/providers/org/apache/dubbo/demo/TypeRequest';
diff --git a/examples/hello-egg/app/dubbo/index.ts b/examples/hello-egg/app/dubbo/index.ts
index caeaffb..21c2fb7 100644
--- a/examples/hello-egg/app/dubbo/index.ts
+++ b/examples/hello-egg/app/dubbo/index.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {Context, Dubbo, setting} from 'dubbo-js';
+import {Context, Dubbo, setting} from 'apache-dubbo-js';
 import {EggApplication} from 'egg';
 import service from './service';
 
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts
index a631de7..6692a54 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {Dubbo, TDubboCallResult} from 'dubbo-js';
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
 import {argumentMap} from 'interpret-util';
 import {TypeRequest} from './TypeRequest';
 
@@ -32,4 +32,4 @@
   });
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts
index d9c2923..47a46e9 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import {Dubbo, TDubboCallResult} from 'dubbo-js';
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
 import {argumentMap, JavaString} from 'interpret-util';
 import {UserRequest} from './UserRequest';
 import {UserResponse} from './UserResponse';
@@ -40,4 +40,4 @@
   });
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts
index a256b13..baac55e 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {Dubbo, TDubboCallResult} from 'dubbo-js';
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
 import {argumentMap} from 'interpret-util';
 
 export interface IErrorProvider {
@@ -31,4 +31,4 @@
   });
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts
index db4e6e7..9e72540 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts
@@ -19,4 +19,4 @@
   female = 'female',
   male = 'male',
 }
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts
index 87d2e65..ed38d99 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts
@@ -48,4 +48,4 @@
   }
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts
index 081209b..32472a5 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts
@@ -51,4 +51,4 @@
   }
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts
index 717ff20..ffccffe 100644
--- a/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts
+++ b/examples/hello-egg/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts
@@ -43,4 +43,4 @@
   }
 }
 
-//generate by interpret-cli dubbo2.js
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-egg/appveyor.yml b/examples/hello-egg/appveyor.yml
index abbf1b7..c274b7d 100644
--- a/examples/hello-egg/appveyor.yml
+++ b/examples/hello-egg/appveyor.yml
@@ -1,19 +1,3 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You under the Apache License, Version 2.0
-#  (the "License"); you may not use this file except in compliance with
-#  the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
 environment:
   matrix:
     - nodejs_version: '8'
diff --git a/examples/hello-egg/dubbo.json b/examples/hello-egg/dubbo.json
index 1de8b5c..fc825ec 100644
--- a/examples/hello-egg/dubbo.json
+++ b/examples/hello-egg/dubbo.json
@@ -1,7 +1,7 @@
 {
   "output": "./app/dubbo/providers",
   "entry": "org.apache.dubbo.demo",
-  "entryJarPath": "../../java/dubbo-demo/dubbo-demo-api/target/dubbo-demo-api-2.6.3.jar",
+  "entryJarPath": "../../java/dubbo-demo/dubbo-demo-api/target/dubbo-demo-api-2.7.4.1.jar",
   "libDirPath": "../../java/dubbo-demo/dubbo-demo-api/target/dependency",
   "providerSuffix": "Provider"
 }
diff --git a/examples/hello-egg/package.json b/examples/hello-egg/package.json
index 58af6ba..b41cb59 100644
--- a/examples/hello-egg/package.json
+++ b/examples/hello-egg/package.json
@@ -11,7 +11,7 @@
     "stop": "egg-scripts stop --title=egg-server-hello-egg",
     "dev": "egg-bin dev -r egg-ts-helper/register",
     "debug": "egg-bin debug -r egg-ts-helper/register",
-    "interpret:denp": "cd ../../java/dubbo-demo/dubbo-demo-api && mvn package && mvn install dependency:copy-dependencies",
+    "interpret:denp": "cd ../../java/dubbo-demo/dubbo-demo-api && mvn clean package && mvn clean install",
     "interpret": "npm run interpret:denp  && interpret -c dubbo.json",
     "test-local": "egg-bin test -r egg-ts-helper/register",
     "test": "npm run lint -- --fix && npm run test-local",
@@ -23,15 +23,13 @@
     "clean": "ets clean"
   },
   "dependencies": {
-    "@types/js-to-java": "^2.4.0",
-    "dubbo-invoker": "^1.0.2",
-    "dubbo2.js": "^2.3.8",
+    "apache-dubbo-js": "^3.0.0-rc6",
     "egg": "^2.11.2",
     "egg-scripts": "^2.9.1",
     "interpret-util": "^0.0.6"
   },
   "devDependencies": {
-    "interpret-dubbo2js": "0.0.22",
+    "@types/js-to-java": "^2.4.1",
     "@types/mocha": "^2.2.40",
     "@types/node": "^7.0.12",
     "@types/supertest": "^2.0.0",
@@ -41,6 +39,7 @@
     "egg-ci": "^1.8.0",
     "egg-mock": "^3.16.0",
     "egg-ts-helper": "^1.4.2",
+    "interpret-dubbo2js": "0.0.22",
     "tslib": "^1.9.0",
     "tslint": "^4.0.0",
     "typescript": "^2.8.1"
diff --git a/examples/hello-egg/typings/app/controller/index.d.ts b/examples/hello-egg/typings/app/controller/index.d.ts
new file mode 100644
index 0000000..943a32d
--- /dev/null
+++ b/examples/hello-egg/typings/app/controller/index.d.ts
@@ -0,0 +1,11 @@
+// This file is created by egg-ts-helper@1.25.8
+// Do not modify this file!!!!!!!!!
+
+import 'egg';
+import ExportHome from '../../../app/controller/home';
+
+declare module 'egg' {
+  interface IController {
+    home: ExportHome;
+  }
+}
diff --git a/examples/hello-egg/typings/app/index.d.ts b/examples/hello-egg/typings/app/index.d.ts
new file mode 100644
index 0000000..7b891bb
--- /dev/null
+++ b/examples/hello-egg/typings/app/index.d.ts
@@ -0,0 +1,6 @@
+// This file is created by egg-ts-helper@1.25.8
+// Do not modify this file!!!!!!!!!
+
+import 'egg';
+export * from 'egg';
+export as namespace Egg;
diff --git a/examples/hello-egg/typings/app/service/index.d.ts b/examples/hello-egg/typings/app/service/index.d.ts
new file mode 100644
index 0000000..bcc219c
--- /dev/null
+++ b/examples/hello-egg/typings/app/service/index.d.ts
@@ -0,0 +1,18 @@
+// This file is created by egg-ts-helper@1.25.8
+// Do not modify this file!!!!!!!!!
+
+import 'egg';
+type AnyClass = new (...args: any[]) => any;
+type AnyFunc<T = any> = (...args: any[]) => T;
+type CanExportFunc = AnyFunc<Promise<any>> | AnyFunc<IterableIterator<any>>;
+type AutoInstanceType<
+  T,
+  U = T extends CanExportFunc ? T : T extends AnyFunc ? ReturnType<T> : T
+> = U extends AnyClass ? InstanceType<U> : U;
+import ExportTest from '../../../app/service/test';
+
+declare module 'egg' {
+  interface IService {
+    test: AutoInstanceType<typeof ExportTest>;
+  }
+}
diff --git a/examples/hello-egg/typings/config/index.d.ts b/examples/hello-egg/typings/config/index.d.ts
new file mode 100644
index 0000000..55b6091
--- /dev/null
+++ b/examples/hello-egg/typings/config/index.d.ts
@@ -0,0 +1,11 @@
+// This file is created by egg-ts-helper@1.25.8
+// Do not modify this file!!!!!!!!!
+
+import 'egg';
+import {EggAppConfig} from 'egg';
+import ExportConfigDefault from '../../config/config.default';
+type ConfigDefault = ReturnType<typeof ExportConfigDefault>;
+type NewEggAppConfig = ConfigDefault;
+declare module 'egg' {
+  interface EggAppConfig extends NewEggAppConfig {}
+}
diff --git a/examples/hello-egg/typings/config/plugin.d.ts b/examples/hello-egg/typings/config/plugin.d.ts
new file mode 100644
index 0000000..8f88058
--- /dev/null
+++ b/examples/hello-egg/typings/config/plugin.d.ts
@@ -0,0 +1,33 @@
+// This file is created by egg-ts-helper@1.25.8
+// Do not modify this file!!!!!!!!!
+
+import 'egg';
+import 'egg-onerror';
+import 'egg-session';
+import 'egg-i18n';
+import 'egg-watcher';
+import 'egg-multipart';
+import 'egg-security';
+import 'egg-development';
+import 'egg-logrotator';
+import 'egg-schedule';
+import 'egg-static';
+import 'egg-jsonp';
+import 'egg-view';
+import {EggPluginItem} from 'egg';
+declare module 'egg' {
+  interface EggPlugin {
+    onerror?: EggPluginItem;
+    session?: EggPluginItem;
+    i18n?: EggPluginItem;
+    watcher?: EggPluginItem;
+    multipart?: EggPluginItem;
+    security?: EggPluginItem;
+    development?: EggPluginItem;
+    logrotator?: EggPluginItem;
+    schedule?: EggPluginItem;
+    static?: EggPluginItem;
+    jsonp?: EggPluginItem;
+    view?: EggPluginItem;
+  }
+}
diff --git a/examples/hello-koa/README.md b/examples/hello-koa/README.md
new file mode 100644
index 0000000..88e7a04
--- /dev/null
+++ b/examples/hello-koa/README.md
@@ -0,0 +1,21 @@
+## QuickStart
+
+### Development
+
+```bash
+$ cd ../../
+$ sh start_dubbo_service.sh
+$ cd examples/hello-koa
+$ yarn
+$ yarn start
+$ open http://localhost:3000/hello
+```
+
+### Requirement
+
+- Node.js 8.x
+- Typescript 2.8+
+
+### Attention
+
+This example does not use a translator.
diff --git a/examples/hello-koa/dubbo/dubbo-es6.ts b/examples/hello-koa/dubbo/dubbo-es6.ts
deleted file mode 100644
index 66b6b80..0000000
--- a/examples/hello-koa/dubbo/dubbo-es6.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import {Dubbo, setting} from 'dubbo-js';
-import * as service from './service';
-
-const dubboSetting = setting
-  .match(
-    [
-      'org.apache.dubbo.demo.DemoProvider',
-      'org.apache.dubbo.demo.ErrorProvider',
-    ],
-    {
-      version: '1.0.0',
-    },
-  )
-  .match('org.apache.dubbo.demo.BasicTypeProvider', {version: '2.0.0'});
-
-export default new Dubbo<typeof service>({
-  application: {name: 'dubbo-node-consumer1'},
-  service,
-  dubboSetting,
-  register: 'localhost:2181,localhost:2182,localhost:2183',
-});
-
-//middleware
-// dubbo.use(async function costTime(ctx, next) {
-//   console.log('before dubbo cost middleware');
-//   const startTime = Date.now();
-//   await next();
-//   const endTime = Date.now();
-//   console.log('end makecostTime->', endTime - startTime);
-// });
diff --git a/examples/hello-koa/dubbo/dubbo.ts b/examples/hello-koa/dubbo/dubbo.ts
index 3d7623d..a117ba7 100644
--- a/examples/hello-koa/dubbo/dubbo.ts
+++ b/examples/hello-koa/dubbo/dubbo.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {Dubbo, setting, zk} from 'dubbo-js';
+import {Dubbo, setting, zk} from 'apache-dubbo-js';
 import * as service from './service';
 
 const dubboSetting = setting
@@ -52,36 +52,3 @@
 });
 
 export default dubbo;
-
-// dubbo.ready().then(() => {
-//   console.log('dubbo was ready');
-// });
-
-// dubbo.subscribe({
-//   onTrace: msg => {
-//     console.log(msg);
-//   },
-// });
-
-//cost middleware
-/*dubbo.use(async function costTime(ctx, next) {
-  console.log('before dubbo cost middleware');
-  const startTime = Date.now();
-  await next();
-  const endTime = Date.now();
-  console.log('end makecostTime->', endTime - startTime);
-});
-*/
-
-// dubbo.use(async function trace(ctx, next) {
-//   const uuid = Date.now();
-//   ctx.attachments = {
-//     uuid,
-//   };
-
-//   ctx.attachments = {
-//     userId: uuid,
-//   };
-
-//   await next();
-// });
diff --git a/examples/hello-koa/dubbo/service.ts b/examples/hello-koa/dubbo/service.ts
index 7e9106f..f408071 100644
--- a/examples/hello-koa/dubbo/service.ts
+++ b/examples/hello-koa/dubbo/service.ts
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-import {Dubbo, java, TDubboCallResult} from 'dubbo-js';
+import {Dubbo, java, TDubboCallResult} from 'apache-dubbo-js';
 
 //=====================types===========================
 export interface IUserResponse {
diff --git a/examples/hello-koa/package.json b/examples/hello-koa/package.json
index 912e252..7bbd411 100644
--- a/examples/hello-koa/package.json
+++ b/examples/hello-koa/package.json
@@ -4,10 +4,8 @@
   "description": "",
   "main": "index.js",
   "scripts": {
-    "debug:start": "DEBUG=dubbo* ts-node server2017.ts",
-    "start": "ts-node server2017.ts",
-    "debug:start:5": "DEBUG=dubbo* ts-node server2015.ts",
-    "start:5": "ts-node server2015.ts"
+    "debug:start": "DEBUG=dubbo* ts-node server.ts",
+    "start": "ts-node server.ts"
   },
   "keywords": [],
   "author": "",
@@ -15,5 +13,8 @@
   "devDependencies": {
     "koa": "^2.4.1",
     "koa-router": "^7.3.0"
+  },
+  "dependencies": {
+    "apache-dubbo-js": "^3.0.0-rc6"
   }
 }
diff --git a/examples/hello-koa/server2017.ts b/examples/hello-koa/server.ts
similarity index 88%
rename from examples/hello-koa/server2017.ts
rename to examples/hello-koa/server.ts
index 4fa050b..3752669 100644
--- a/examples/hello-koa/server2017.ts
+++ b/examples/hello-koa/server.ts
@@ -22,37 +22,37 @@
 const app = new Koa();
 const router = new Router();
 
-router.get('/', ctx => {
+router.get('/', (ctx) => {
   ctx.body = 'hello, dubbo.js';
 });
 
-router.get('/hello', async ctx => {
+router.get('/hello', async (ctx) => {
   const {res, err} = await dubbo.service.demoProvider.sayHello('test');
   console.log(await dubbo.service.basicTypeProvider.testBasicType());
   ctx.body = err ? err.message : res;
 });
 
-router.get('/user', async ctx => {
+router.get('/user', async (ctx) => {
   const {res, err} = await dubbo.service.demoProvider.getUserInfo();
   ctx.body = res || err.message;
 });
 
-router.get('/echo', async ctx => {
+router.get('/echo', async (ctx) => {
   ctx.body = await dubbo.service.demoProvider.echo();
 });
 
-router.get('/type', async ctx => {
+router.get('/type', async (ctx) => {
   const {res, err} = await dubbo.service.basicTypeProvider.testBasicType();
   ctx.body = res;
 });
 
-router.get('/exp', async ctx => {
+router.get('/exp', async (ctx) => {
   const {err, res} = await dubbo.service.errorProvider.errorTest();
   console.log(err);
   ctx.body = 'ok';
 });
 
-router.get('/tracer', async ctx => {
+router.get('/tracer', async (ctx) => {
   const {res: hello} = await dubbo.service.demoProvider.sayHello('test');
   const {res: userInfo} = await dubbo.service.demoProvider.getUserInfo();
 
diff --git a/examples/hello-koa/server2015.ts b/examples/hello-koa/server2015.ts
deleted file mode 100644
index 09c8fc6..0000000
--- a/examples/hello-koa/server2015.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import Koa from 'koa';
-import Router from 'koa-router';
-import dubbo from './dubbo/dubbo-es6';
-
-const app = new Koa();
-const router = new Router();
-
-router.get('/', ctx => {
-  ctx.body = 'hello, dubbo.js';
-});
-
-router.get('/hello', async ctx => {
-  const {res, err} = await dubbo.service.demoProvider.sayHello('test');
-  console.log(await dubbo.service.basicTypeProvider.testBasicType());
-  ctx.body = err ? err.message : res;
-});
-
-router.get('/user', async ctx => {
-  const {res, err} = await dubbo.service.demoProvider.getUserInfo();
-  ctx.body = res || err.message;
-});
-
-router.get('/echo', async ctx => {
-  ctx.body = await dubbo.service.demoProvider.echo();
-});
-
-router.get('/type', async ctx => {
-  const {res, err} = await dubbo.service.basicTypeProvider.testBasicType();
-  ctx.body = res;
-});
-
-router.get('/exp', async ctx => {
-  const {err, res} = await dubbo.service.errorProvider.errorTest();
-  console.log(err);
-  ctx.body = 'ok';
-});
-
-router.get('/tracer', async ctx => {
-  const {res: hello} = await dubbo.service.demoProvider.sayHello('test');
-  const {res: userInfo} = await dubbo.service.demoProvider.getUserInfo();
-
-  setTimeout(async () => {
-    await dubbo.service.basicTypeProvider.testBasicType();
-    process.nextTick(() => {
-      dubbo.service.demoProvider.getUserInfo();
-    });
-  });
-
-  ctx.body = {
-    hello,
-    userInfo,
-  };
-});
-
-app.use(router.routes()).use(router.allowedMethods());
-
-app.listen(3001);
diff --git a/examples/hello-koa/yarn.lock b/examples/hello-koa/yarn.lock
index d7149f9..96fc19c 100644
--- a/examples/hello-koa/yarn.lock
+++ b/examples/hello-koa/yarn.lock
@@ -9,10 +9,36 @@
     mime-types "~2.1.16"
     negotiator "0.6.1"
 
-any-promise@^1.1.0:
+any-promise@^1.0.0, any-promise@^1.1.0:
   version "1.3.0"
   resolved "http://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
 
+apache-dubbo-js@^3.0.0-rc6:
+  version "3.0.0-rc6"
+  resolved "http://npm.vivo.com.cn/apache-dubbo-js/-/apache-dubbo-js-3.0.0-rc6.tgz#d10c53fe242633d6be71f6dff11312a1d6556bb2"
+  integrity sha1-0QxT/iQmM9a+cfbf8RMSodZVa7I=
+  dependencies:
+    debug "3.1.0"
+    hessian.js "2.5.0"
+    ip "1.1.5"
+    js-to-java "2.4.0"
+    koa-compose "4.0.0"
+    node-zookeeper-client "0.2.2"
+
+async@~0.2.7:
+  version "0.2.10"
+  resolved "http://npm.vivo.com.cn/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
+  integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E=
+
+byte@^1.1.6:
+  version "1.4.1"
+  resolved "http://npm.vivo.com.cn/byte/-/byte-1.4.1.tgz#a80553d2aae53b1856ab54fa7743e03a20dcc944"
+  integrity sha1-qAVT0qrlOxhWq1T6d0PgOiDcyUQ=
+  dependencies:
+    debug "^2.6.6"
+    long "^3.2.0"
+    utility "^1.12.0"
+
 co@^4.6.0:
   version "4.6.0"
   resolved "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
@@ -32,12 +58,29 @@
     depd "~1.1.1"
     keygrip "~1.0.2"
 
-debug@*, debug@^3.1.0:
+copy-to@^2.0.1:
+  version "2.0.1"
+  resolved "http://npm.vivo.com.cn/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
+  integrity sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU=
+
+core-util-is@^1.0.2:
+  version "1.0.2"
+  resolved "http://npm.vivo.com.cn/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+  integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+debug@*, debug@3.1.0, debug@^3.1.0:
   version "3.1.0"
   resolved "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
   dependencies:
     ms "2.0.0"
 
+debug@^2.6.6, debug@^2.6.8:
+  version "2.6.9"
+  resolved "http://npm.vivo.com.cn/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+  integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=
+  dependencies:
+    ms "2.0.0"
+
 deep-equal@~1.0.1:
   version "1.0.1"
   resolved "http://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
@@ -62,14 +105,32 @@
   version "1.0.0"
   resolved "http://registry.npm.taobao.org/error-inject/download/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
 
-escape-html@~1.0.1:
+escape-html@^1.0.3, escape-html@~1.0.1:
   version "1.0.3"
   resolved "http://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
 
+extend-shallow@^2.0.1:
+  version "2.0.1"
+  resolved "http://npm.vivo.com.cn/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
+  integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
+  dependencies:
+    is-extendable "^0.1.0"
+
 fresh@^0.5.2:
   version "0.5.2"
   resolved "http://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
 
+hessian.js@2.5.0:
+  version "2.5.0"
+  resolved "http://npm.vivo.com.cn/hessian.js/-/hessian.js-2.5.0.tgz#da18f63c8d1702e3f6d28a1135744dd1421e77fe"
+  integrity sha1-2hj2PI0XAuP20ooRNXRN0UIed/4=
+  dependencies:
+    byte "^1.1.6"
+    debug "^2.6.8"
+    is-type-of "^1.1.0"
+    long "^3.2.0"
+    utility "^1.12.0"
+
 http-assert@^1.1.0:
   version "1.3.0"
   resolved "http://registry.npm.taobao.org/http-assert/download/http-assert-1.3.0.tgz#a31a5cf88c873ecbb5796907d4d6f132e8c01e4a"
@@ -90,28 +151,62 @@
   version "2.0.3"
   resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
 
+ip@1.1.5:
+  version "1.1.5"
+  resolved "http://npm.vivo.com.cn/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
+  integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
+
+is-class-hotfix@~0.0.6:
+  version "0.0.6"
+  resolved "http://npm.vivo.com.cn/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz#a527d31fb23279281dde5f385c77b5de70a72435"
+  integrity sha1-pSfTH7IyeSgd3l84XHe13nCnJDU=
+
+is-extendable@^0.1.0:
+  version "0.1.1"
+  resolved "http://npm.vivo.com.cn/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
+  integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
+
 is-generator-function@^1.0.3:
   version "1.0.6"
   resolved "http://registry.npm.taobao.org/is-generator-function/download/is-generator-function-1.0.6.tgz#9e71653cd15fff341c79c4151460a131d31e9fc4"
 
+is-type-of@^1.1.0:
+  version "1.2.1"
+  resolved "http://npm.vivo.com.cn/is-type-of/-/is-type-of-1.2.1.tgz#e263ec3857aceb4f28c47130ec78db09a920f8c5"
+  integrity sha1-4mPsOFes608oxHEw7HjbCakg+MU=
+  dependencies:
+    core-util-is "^1.0.2"
+    is-class-hotfix "~0.0.6"
+    isstream "~0.1.2"
+
 isarray@0.0.1:
   version "0.0.1"
   resolved "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
 
+isstream@~0.1.2:
+  version "0.1.2"
+  resolved "http://npm.vivo.com.cn/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+  integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+js-to-java@2.4.0:
+  version "2.4.0"
+  resolved "http://npm.vivo.com.cn/js-to-java/-/js-to-java-2.4.0.tgz#b275f2ddfeb2f71e6bd0c41cb74573187f201a50"
+  integrity sha1-snXy3f6y9x5r0MQct0VzGH8gGlA=
+
 keygrip@~1.0.2:
   version "1.0.2"
   resolved "http://registry.npm.taobao.org/keygrip/download/keygrip-1.0.2.tgz#ad3297c557069dea8bcfe7a4fa491b75c5ddeb91"
 
+koa-compose@4.0.0, koa-compose@^4.0.0:
+  version "4.0.0"
+  resolved "http://registry.npm.taobao.org/koa-compose/download/koa-compose-4.0.0.tgz#2800a513d9c361ef0d63852b038e4f6f2d5a773c"
+
 koa-compose@^3.0.0:
   version "3.2.1"
   resolved "http://registry.npm.taobao.org/koa-compose/download/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7"
   dependencies:
     any-promise "^1.1.0"
 
-koa-compose@^4.0.0:
-  version "4.0.0"
-  resolved "http://registry.npm.taobao.org/koa-compose/download/koa-compose-4.0.0.tgz#2800a513d9c361ef0d63852b038e4f6f2d5a773c"
-
 koa-convert@^1.2.0:
   version "1.2.0"
   resolved "http://registry.npm.taobao.org/koa-convert/download/koa-convert-1.2.0.tgz#da40875df49de0539098d1700b50820cebcd21d0"
@@ -163,6 +258,11 @@
     type-is "^1.5.5"
     vary "^1.0.0"
 
+long@^3.2.0:
+  version "3.2.0"
+  resolved "http://npm.vivo.com.cn/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
+  integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=
+
 media-typer@0.3.0:
   version "0.3.0"
   resolved "http://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -181,14 +281,48 @@
   dependencies:
     mime-db "~1.30.0"
 
+minimist@^1.2.5:
+  version "1.2.5"
+  resolved "http://npm.vivo.com.cn/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
+  integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=
+
+mkdirp@^0.5.1:
+  version "0.5.5"
+  resolved "http://npm.vivo.com.cn/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
+  integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=
+  dependencies:
+    minimist "^1.2.5"
+
 ms@2.0.0:
   version "2.0.0"
   resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
 
+mz@^2.7.0:
+  version "2.7.0"
+  resolved "http://npm.vivo.com.cn/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
+  integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
+  dependencies:
+    any-promise "^1.0.0"
+    object-assign "^4.0.1"
+    thenify-all "^1.0.0"
+
 negotiator@0.6.1:
   version "0.6.1"
   resolved "http://registry.npm.taobao.org/negotiator/download/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
 
+node-zookeeper-client@0.2.2:
+  version "0.2.2"
+  resolved "http://npm.vivo.com.cn/node-zookeeper-client/-/node-zookeeper-client-0.2.2.tgz#097bda01999eef8f602ce068b632600069dbf685"
+  integrity sha1-CXvaAZme749gLOBotjJgAGnb9oU=
+  dependencies:
+    async "~0.2.7"
+    underscore "~1.4.4"
+
+object-assign@^4.0.1:
+  version "4.1.1"
+  resolved "http://npm.vivo.com.cn/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+  integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
 on-finished@^2.1.0:
   version "2.3.0"
   resolved "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
@@ -217,6 +351,20 @@
   version "1.4.0"
   resolved "http://registry.npm.taobao.org/statuses/download/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
 
+thenify-all@^1.0.0:
+  version "1.6.0"
+  resolved "http://npm.vivo.com.cn/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
+  integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=
+  dependencies:
+    thenify ">= 3.1.0 < 4"
+
+"thenify@>= 3.1.0 < 4":
+  version "3.3.1"
+  resolved "http://npm.vivo.com.cn/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
+  integrity sha1-iTLmhqQGYDigFt2eLKRq3Zg4qV8=
+  dependencies:
+    any-promise "^1.0.0"
+
 type-is@^1.5.5:
   version "1.6.15"
   resolved "http://registry.npm.taobao.org/type-is/download/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410"
@@ -224,10 +372,33 @@
     media-typer "0.3.0"
     mime-types "~2.1.15"
 
+underscore@~1.4.4:
+  version "1.4.4"
+  resolved "http://npm.vivo.com.cn/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604"
+  integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ=
+
+unescape@^1.0.1:
+  version "1.0.1"
+  resolved "http://npm.vivo.com.cn/unescape/-/unescape-1.0.1.tgz#956e430f61cad8a4d57d82c518f5e6cc5d0dda96"
+  integrity sha1-lW5DD2HK2KTVfYLFGPXmzF0N2pY=
+  dependencies:
+    extend-shallow "^2.0.1"
+
 urijs@^1.19.0:
   version "1.19.0"
   resolved "http://registry.npm.taobao.org/urijs/download/urijs-1.19.0.tgz#d8aa284d0e7469703a6988ad045c4cbfdf08ada0"
 
+utility@^1.12.0:
+  version "1.16.3"
+  resolved "http://npm.vivo.com.cn/utility/-/utility-1.16.3.tgz#5dfd11de74e6bfdd826cc4a167e6301d92f4b70d"
+  integrity sha1-Xf0R3nTmv92CbMShZ+YwHZL0tw0=
+  dependencies:
+    copy-to "^2.0.1"
+    escape-html "^1.0.3"
+    mkdirp "^0.5.1"
+    mz "^2.7.0"
+    unescape "^1.0.1"
+
 vary@^1.0.0:
   version "1.1.2"
   resolved "http://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
diff --git a/examples/hello-midway/.gitignore b/examples/hello-midway/.gitignore
new file mode 100755
index 0000000..b6cdea6
--- /dev/null
+++ b/examples/hello-midway/.gitignore
@@ -0,0 +1,16 @@
+logs/
+npm-debug.log
+yarn-error.log
+node_modules/
+package-lock.json
+yarn.lock
+coverage/
+dist/
+.idea/
+run/
+.github/
+.DS_Store
+*.sw*
+*.un~
+.tsbuildinfo
+.tsbuildinfo.*
diff --git a/examples/hello-midway/.travis.yml b/examples/hello-midway/.travis.yml
new file mode 100644
index 0000000..97a70fc
--- /dev/null
+++ b/examples/hello-midway/.travis.yml
@@ -0,0 +1,11 @@
+language: node_js
+node_js:
+  - '10'
+before_install:
+  - npm i npminstall -g
+install:
+  - npminstall
+script:
+  - npm run ci
+after_script:
+  - npminstall codecov && codecov
diff --git a/examples/hello-midway/.vscode/launch.json b/examples/hello-midway/.vscode/launch.json
new file mode 100644
index 0000000..10088fa
--- /dev/null
+++ b/examples/hello-midway/.vscode/launch.json
@@ -0,0 +1,29 @@
+{
+  // 使用 IntelliSense 了解相关属性。
+  // 悬停以查看现有属性的描述。
+  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+  "version": "0.2.0",
+  "configurations": [
+    {
+      "name": "Midway Debug",
+      "type": "node",
+      "autoAttachChildProcesses": true,
+      "console": "integratedTerminal",
+      "env": {
+        "NODE_ENV": "local"
+      },
+      "port": 9229,
+      // "preLaunchTask": "TypeScript compile",
+      "protocol": "auto",
+      "request": "launch",
+      "restart": true,
+      "runtimeArgs": ["run", "debug", "--", "--inspect-brk"],
+      "runtimeExecutable": "npm",
+      "skipFiles": [
+        // "${workspaceFolder}/node_modules/**/*.js",
+        "${workspaceFolder}/node_modules/rxjs/**/*.js",
+        "<node_internals>/**/*.js"
+      ]
+    }
+  ]
+}
diff --git a/examples/hello-midway/README.md b/examples/hello-midway/README.md
new file mode 100644
index 0000000..c33f09d
--- /dev/null
+++ b/examples/hello-midway/README.md
@@ -0,0 +1,17 @@
+## QuickStart
+
+### Development
+
+```bash
+$ cd ../../
+$ sh start_dubbo_service.sh
+$ cd examples/hello-midway
+$ yarn
+$ yarn dev
+$ open http://localhost:7001/hello
+```
+
+### Requirement
+
+- Node.js 8.x
+- Typescript 2.8+
diff --git a/examples/hello-midway/appveyor.yml b/examples/hello-midway/appveyor.yml
new file mode 100644
index 0000000..5830a38
--- /dev/null
+++ b/examples/hello-midway/appveyor.yml
@@ -0,0 +1,14 @@
+environment:
+  matrix:
+    - nodejs_version: '10'
+
+install:
+  - ps: Install-Product node $env:nodejs_version
+  - npm i npminstall && node_modules\.bin\npminstall
+
+test_script:
+  - node --version
+  - npm --version
+  - npm run test
+
+build: off
diff --git a/examples/hello-midway/package.json b/examples/hello-midway/package.json
new file mode 100755
index 0000000..95f88bf
--- /dev/null
+++ b/examples/hello-midway/package.json
@@ -0,0 +1,55 @@
+{
+  "name": "hello-midway",
+  "version": "1.0.0",
+  "description": "",
+  "private": true,
+  "dependencies": {
+    "apache-dubbo-js": "^3.0.0-rc6",
+    "egg-scripts": "^2.10.0",
+    "interpret-util": "^0.0.6",
+    "midway": "^1.0.0"
+  },
+  "devDependencies": {
+    "@types/mocha": "^5.2.7",
+    "@types/node": "^10.5.5",
+    "cross-env": "^6.0.0",
+    "egg-ci": "^1.8.0",
+    "midway-bin": "1",
+    "midway-mock": "1",
+    "ts-node": "^8.3.0",
+    "tslib": "^1.8.1",
+    "tslint": "^5.11.0",
+    "tslint-midway-contrib": "1",
+    "typescript": "^3.5.0"
+  },
+  "engines": {
+    "node": ">=10.16.0"
+  },
+  "scripts": {
+    "start": "egg-scripts start --daemon --title=midway-server-hello-midway --framework=midway --ts",
+    "stop": "egg-scripts stop --title=midway-server-hello-midway",
+    "start_build": "npm run build && cross-env NODE_ENV=development midway-bin dev",
+    "clean": "midway-bin clean",
+    "dev": "cross-env NODE_ENV=local midway-bin dev --ts",
+    "debug": "cross-env NODE_ENV=local midway-bin debug --ts",
+    "test": "npm run lint && midway-bin test --ts",
+    "cov": "midway-bin cov --ts",
+    "lint": "tslint --fix -p tsconfig.json -t stylish",
+    "ci": "npm run cov",
+    "build": "midway-bin build -c",
+    "autod": "midway-bin autod"
+  },
+  "ci": {
+    "version": "10"
+  },
+  "midway-bin-clean": [
+    ".vscode/.tsbuildinfo",
+    "dist"
+  ],
+  "repository": {
+    "type": "git",
+    "url": ""
+  },
+  "author": "yangkun",
+  "license": "MIT"
+}
diff --git a/examples/hello-midway/src/app.ts b/examples/hello-midway/src/app.ts
new file mode 100644
index 0000000..fe18b4a
--- /dev/null
+++ b/examples/hello-midway/src/app.ts
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {Application} from 'midway';
+import dubbo from './app/dubbo';
+
+export default async (app: Application) => {
+  dubbo(app);
+  await app.dubbo.ready();
+  app.beforeStart(async () => {
+    console.log('🚀 Your awesome APP is launching...');
+    console.log('✅  Your awesome APP launched');
+  });
+};
diff --git a/examples/hello-midway/src/app/controller/home.ts b/examples/hello-midway/src/app/controller/home.ts
new file mode 100755
index 0000000..2b0ce63
--- /dev/null
+++ b/examples/hello-midway/src/app/controller/home.ts
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {Context, inject, controller, get, provide} from 'midway';
+import {IDubbo} from '../../typings/app/index';
+import {java} from 'apache-dubbo-js';
+
+@provide()
+@controller('/')
+export class HomeController {
+  @inject()
+  ctx: Context;
+
+  @get('/')
+  async index() {
+    this.ctx.body = `Welcome to midwayjs!`;
+  }
+
+  @get('/hello')
+  async dubboTest(ctx: Context & IDubbo) {
+    const {res, err} = await ctx.app.dubbo.service.DemoProvider.sayHello(
+      java.String('hello from node world'),
+    );
+    this.ctx.body = err ? err.message : res;
+  }
+}
diff --git a/examples/hello-midway/src/app/dubbo/index.ts b/examples/hello-midway/src/app/dubbo/index.ts
new file mode 100644
index 0000000..84a39a5
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/index.ts
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {Dubbo, setting} from 'apache-dubbo-js';
+import {Application, Context} from 'midway';
+import service from './service';
+
+export default async (app: Application) => {
+  const {application, register} = app.config.dubbo;
+  const dubboSetting = setting
+    .match(
+      [
+        'org.apache.dubbo.demo.DemoProvider',
+        'org.apache.dubbo.demo.ErrorProvider',
+      ],
+      {
+        version: '1.0.0',
+      },
+    )
+    .match('org.apache.dubbo.demo.BasicTypeProvider', {version: '2.0.0'});
+  const dubbo = new Dubbo<typeof service>({
+    application,
+    register,
+    service,
+    dubboSetting,
+  });
+
+  dubbo.use(async (ctx: Context, next: any) => {
+    const start = Date.now();
+    await next();
+    const end = Date.now();
+    console.log(`${ctx.dubboInterface} was invoked, cost-time ${end - start}`);
+  });
+
+  app.dubbo = dubbo;
+};
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts
new file mode 100644
index 0000000..6692a54
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/BasicTypeProvider.ts
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
+import {argumentMap} from 'interpret-util';
+import {TypeRequest} from './TypeRequest';
+
+export interface IBasicTypeProvider {
+  testBasicType(request: TypeRequest): TDubboCallResult<TypeRequest>;
+}
+
+export const BasicTypeProviderWrapper = {testBasicType: argumentMap};
+
+export function BasicTypeProvider(dubbo: Dubbo): IBasicTypeProvider {
+  return dubbo.proxyService<IBasicTypeProvider>({
+    dubboInterface: 'org.apache.dubbo.demo.BasicTypeProvider',
+    methods: BasicTypeProviderWrapper,
+  });
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts
new file mode 100644
index 0000000..47a46e9
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/DemoProvider.ts
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
+import {argumentMap, JavaString} from 'interpret-util';
+import {UserRequest} from './UserRequest';
+import {UserResponse} from './UserResponse';
+
+export interface IDemoProvider {
+  sayHello(name: JavaString): TDubboCallResult<string>;
+  test(): TDubboCallResult<void>;
+  echo(): TDubboCallResult<string>;
+  getUserInfo(request: UserRequest): TDubboCallResult<UserResponse>;
+}
+
+export const DemoProviderWrapper = {
+  sayHello: argumentMap,
+  test: argumentMap,
+  echo: argumentMap,
+  getUserInfo: argumentMap,
+};
+
+export function DemoProvider(dubbo: Dubbo): IDemoProvider {
+  return dubbo.proxyService<IDemoProvider>({
+    dubboInterface: 'org.apache.dubbo.demo.DemoProvider',
+    methods: DemoProviderWrapper,
+  });
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts
new file mode 100644
index 0000000..baac55e
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/ErrorProvider.ts
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {Dubbo, TDubboCallResult} from 'apache-dubbo-js';
+import {argumentMap} from 'interpret-util';
+
+export interface IErrorProvider {
+  errorTest(): TDubboCallResult<void>;
+}
+
+export const ErrorProviderWrapper = {errorTest: argumentMap};
+
+export function ErrorProvider(dubbo: Dubbo): IErrorProvider {
+  return dubbo.proxyService<IErrorProvider>({
+    dubboInterface: 'org.apache.dubbo.demo.ErrorProvider',
+    methods: ErrorProviderWrapper,
+  });
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts
new file mode 100644
index 0000000..9e72540
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/Sex.ts
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum Sex {
+  female = 'female',
+  male = 'male',
+}
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts
new file mode 100644
index 0000000..b5e8b15
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/TypeRequest.ts
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {java} from 'apache-dubbo-js';
+
+export interface ITypeRequest {
+  bigDecimal?: {value: string};
+  map?: {[name: string]: string};
+}
+
+export class TypeRequest {
+  constructor(params: ITypeRequest) {
+    this.bigDecimal = params.bigDecimal;
+    this.map = params.map;
+  }
+
+  bigDecimal?: {value: string};
+  map?: {[name: string]: string};
+
+  __fields2java() {
+    let mapMapTransfer = new Map();
+    for (let mapKey in this.map) {
+      mapMapTransfer.set(java.String(mapKey), java.String(this.map[mapKey]));
+    }
+    return {
+      $class: 'org.apache.dubbo.demo.TypeRequest',
+      $: {
+        bigDecimal: this.bigDecimal
+          ? java.BigDecimal(this.bigDecimal.value)
+          : null,
+        map: java.Map(mapMapTransfer),
+      },
+    };
+  }
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts
new file mode 100644
index 0000000..7d3c455
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserRequest.ts
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {java} from 'apache-dubbo-js';
+import {Sex} from './Sex';
+
+export interface IUserRequest {
+  sex?: Sex;
+  name?: string;
+  id?: number;
+  email?: string;
+}
+
+export class UserRequest {
+  constructor(params: IUserRequest) {
+    this.sex = params.sex;
+    this.name = params.name;
+    this.id = params.id;
+    this.email = params.email;
+  }
+
+  sex?: Sex;
+  name?: string;
+  id?: number;
+  email?: string;
+
+  __fields2java() {
+    return {
+      $class: 'org.apache.dubbo.demo.UserRequest',
+      $: {
+        sex: java['enum']('org.apache.dubbo.demo.Sex', Sex[this.sex]),
+        name: java.String(this.name),
+        id: java.Integer(this.id),
+        email: java.String(this.email),
+      },
+    };
+  }
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts
new file mode 100644
index 0000000..542a93c
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/providers/org/apache/dubbo/demo/UserResponse.ts
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {java} from 'apache-dubbo-js';
+
+export interface IUserResponse {
+  status?: string;
+  info?: {[name: string]: string};
+}
+
+export class UserResponse {
+  constructor(params: IUserResponse) {
+    this.status = params.status;
+    this.info = params.info;
+  }
+
+  status?: string;
+  info?: {[name: string]: string};
+
+  __fields2java() {
+    let infoMapTransfer = new Map();
+    for (let mapKey in this.info) {
+      infoMapTransfer.set(java.String(mapKey), java.String(this.info[mapKey]));
+    }
+    return {
+      $class: 'org.apache.dubbo.demo.UserResponse',
+      $: {status: java.String(this.status), info: java.Map(infoMapTransfer)},
+    };
+  }
+}
+
+//generate by interpret-cli apache-dubbo-js
diff --git a/examples/hello-midway/src/app/dubbo/service.ts b/examples/hello-midway/src/app/dubbo/service.ts
new file mode 100644
index 0000000..91f9882
--- /dev/null
+++ b/examples/hello-midway/src/app/dubbo/service.ts
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {BasicTypeProvider} from './providers/org/apache/dubbo/demo/BasicTypeProvider';
+import {DemoProvider} from './providers/org/apache/dubbo/demo/DemoProvider';
+import {ErrorProvider} from './providers/org/apache/dubbo/demo/ErrorProvider';
+
+export default {
+  DemoProvider,
+  BasicTypeProvider,
+  ErrorProvider,
+};
diff --git a/examples/hello-midway/src/app/public/README.md b/examples/hello-midway/src/app/public/README.md
new file mode 100755
index 0000000..b4b045a
--- /dev/null
+++ b/examples/hello-midway/src/app/public/README.md
@@ -0,0 +1 @@
+## public static file directory!
diff --git a/examples/hello-midway/src/config/config.default.ts b/examples/hello-midway/src/config/config.default.ts
new file mode 100644
index 0000000..84214a5
--- /dev/null
+++ b/examples/hello-midway/src/config/config.default.ts
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {EggAppConfig, EggAppInfo, PowerPartial} from 'midway';
+
+export type DefaultConfig = PowerPartial<EggAppConfig>;
+
+export default (appInfo: EggAppInfo) => {
+  const config = {} as DefaultConfig;
+
+  // use for cookie sign key, should change to your own and keep security
+  config.keys = appInfo.name + '_1599135676543_3920';
+
+  // add your config here
+  config.middleware = [];
+
+  config.dubbo = {
+    application: 'hello-midway',
+    register: 'localhost:2181,localhost:2182,localhost:2183',
+  };
+
+  return config;
+};
diff --git a/examples/hello-midway/src/config/config.local.ts b/examples/hello-midway/src/config/config.local.ts
new file mode 100644
index 0000000..053dca5
--- /dev/null
+++ b/examples/hello-midway/src/config/config.local.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export const development = {
+  watchDirs: [
+    'app',
+    'lib',
+    'service',
+    'config',
+    'app.ts',
+    'agent.ts',
+    'interface.ts',
+  ],
+  overrideDefault: true,
+};
diff --git a/examples/hello-midway/src/config/plugin.ts b/examples/hello-midway/src/config/plugin.ts
new file mode 100755
index 0000000..1f58457
--- /dev/null
+++ b/examples/hello-midway/src/config/plugin.ts
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import {EggPlugin} from 'midway';
+export default {
+  static: true, // default is true
+} as EggPlugin;
diff --git a/examples/hello-midway/src/typings/app/index.d.ts b/examples/hello-midway/src/typings/app/index.d.ts
new file mode 100644
index 0000000..37ea301
--- /dev/null
+++ b/examples/hello-midway/src/typings/app/index.d.ts
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import dubbo from '../../app/dubbo';
+declare module 'egg' {}
+
+interface IDubbo {
+  app: {
+    dubbo: any;
+  };
+}
diff --git a/examples/hello-midway/src/typings/globals/index.d.ts b/examples/hello-midway/src/typings/globals/index.d.ts
new file mode 100644
index 0000000..da29b82
--- /dev/null
+++ b/examples/hello-midway/src/typings/globals/index.d.ts
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+type ExtendInterface<T> = {[P in keyof T]: T[P]};
+
+interface GlobalMiddlewareNameObject {
+  //
+}
+
+interface GlobalControllerRouterOptions {
+  sensitive?: boolean;
+  middleware: GlobalMiddlewareNames;
+}
+
+type GlobalMiddlewareNames = (keyof GlobalMiddlewareNameObject)[] | undefined;
+
+interface GlobalValidateIdentifierObject {
+  //
+}
+
+interface AnyObject {
+  [k: string]: any;
+}
diff --git a/examples/hello-midway/test/app/controller/home.test.ts b/examples/hello-midway/test/app/controller/home.test.ts
new file mode 100755
index 0000000..ceb9472
--- /dev/null
+++ b/examples/hello-midway/test/app/controller/home.test.ts
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* tslint:disable */
+const {app, assert} = require('midway-mock/bootstrap');
+/* tslint:enable */
+
+describe('test/app/controller/home.test.ts', () => {
+  it('should assert', async () => {
+    const pkg = require('../../../package.json');
+    assert(app.config.keys.startsWith(pkg.name));
+  });
+
+  it('should GET /', () => {
+    return app
+      .httpRequest()
+      .get('/')
+      .expect('Welcome to midwayjs!')
+      .expect(200);
+  });
+});
diff --git a/examples/hello-midway/tsconfig.json b/examples/hello-midway/tsconfig.json
new file mode 100644
index 0000000..e462d28
--- /dev/null
+++ b/examples/hello-midway/tsconfig.json
@@ -0,0 +1,18 @@
+{
+  "compileOnSave": true,
+  "compilerOptions": {
+    "target": "ES2018",
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "experimentalDecorators": true,
+    "emitDecoratorMetadata": true,
+    "inlineSourceMap": true,
+    "noImplicitThis": true,
+    "noUnusedLocals": true,
+    "stripInternal": true,
+    "pretty": true,
+    "declaration": true,
+    "outDir": "dist"
+  },
+  "exclude": ["dist", "node_modules", "test"]
+}
diff --git a/examples/hello-midway/tslint.json b/examples/hello-midway/tslint.json
new file mode 100644
index 0000000..13cbe4a
--- /dev/null
+++ b/examples/hello-midway/tslint.json
@@ -0,0 +1,3 @@
+{
+  "extends": ["tslint-midway-contrib"]
+}