# How should i register plugin from Hapi docs in Kibana?

**URL:** <https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239>\
**Category:** Kibana\
**Created:** [June 11, 2019, 4:05pm UTC](https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239 "2019-06-11T16:05:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![masterThomas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/masterthomas/32/42765_2.png) [@masterThomas](https://discuss.elastic.co/u/masterThomas)\
**Post date:** [June 11, 2019, 4:05pm UTC](https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239/1 "2019-06-11T16:05:42Z")

</div>

hi team, is there any tutorial for this?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [June 12, 2019, 2:10pm UTC](https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239/2 "2019-06-12T14:10:12Z")

</div>

Can you describe what you are trying to do in more detail? Are you referring to registering a hapi plugin or is this question about kibana plugins?

The `server` object exposes the hapi interface so you can call any hapi method and register your hapi plugin that way.

Your kibana plugin has an index.js file that defines the configuration passed to `new kibana.Plugin` for initialization. Specify the `init` object key for your plugin configuration. `init` is a function that is called with the server object.

```auto
  return new kibana.Plugin({
    init: async (server) => {
      //server exposes Hapi.server()
     await server.register(require('myplugin'));
    }
  }

```

---

<div class="post-metadata">

**Author:** ![masterThomas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/masterthomas/32/42765_2.png) [@masterThomas](https://discuss.elastic.co/u/masterThomas)\
**Post date:** [June 13, 2019, 8:25am UTC](https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239/3 "2019-06-13T08:25:27Z")

</div>

I am just trying to implement this functionality [https://github.com/fknop/hapi-pagination](https://github.com/fknop/hapi-pagination), which is a part of hapi framework. My task is to do pagination for my custom table visualization.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 11, 2019, 8:25am UTC](https://discuss.elastic.co/t/how-should-i-register-plugin-from-hapi-docs-in-kibana/185239/4 "2019-07-11T08:25:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
