mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +00:00
docs(api-ref): adding event hub doc
This commit is contained in:
parent
b45459020f
commit
a2e8c9a2f2
@ -101,3 +101,9 @@ Strapi server object.
|
|||||||
- [<Type>StrapiFS</Type>](StrapiFS)
|
- [<Type>StrapiFS</Type>](StrapiFS)
|
||||||
|
|
||||||
Wrapper around [FS NodeJS module](https://nodejs.org/docs/latest-v18.x/api/fs.html).
|
Wrapper around [FS NodeJS module](https://nodejs.org/docs/latest-v18.x/api/fs.html).
|
||||||
|
|
||||||
|
### `strapi.eventHub`
|
||||||
|
- [<Type>EventHub</Type>](EventHub)
|
||||||
|
|
||||||
|
Module to manipulate events around Strapi project. It is an instance of [EventEmitter](https://nodejs.org/docs/latest-v18.x/api/events.html#class-eventemitter) from NodeJS.
|
||||||
|
|
||||||
|
27
docs/docs/api/event-hub.mdx
Normal file
27
docs/docs/api/event-hub.mdx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: EventHub
|
||||||
|
slug: /api/EventHub
|
||||||
|
tags:
|
||||||
|
- module
|
||||||
|
- public
|
||||||
|
|
||||||
|
toc_min_heading_level: 2
|
||||||
|
toc_max_heading_level: 3
|
||||||
|
---
|
||||||
|
import Type from '@site/docs/api/components/Type';
|
||||||
|
|
||||||
|
# Strapi Event Hub
|
||||||
|
|
||||||
|
:::info
|
||||||
|
|
||||||
|
Current state: **Stable**
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
Strapi Event Hub module - description to be done
|
||||||
|
|
||||||
|
## Module: EventHub
|
||||||
|
|
||||||
|
### `createEventHub()`
|
||||||
|
|
||||||
|
//TODO
|
@ -112,11 +112,6 @@ class Strapi {
|
|||||||
// Strapi utils instanciation
|
// Strapi utils instanciation
|
||||||
this.fs = createStrapiFs(this);
|
this.fs = createStrapiFs(this);
|
||||||
|
|
||||||
// TODO put this in /docs/docs/API/Strapi
|
|
||||||
/*
|
|
||||||
eventHub instance of EventEmitter = require('events');
|
|
||||||
Link to nodejs events doc
|
|
||||||
*/
|
|
||||||
this.eventHub = createEventHub();
|
this.eventHub = createEventHub();
|
||||||
|
|
||||||
// TODO put this in /docs/docs/API/Strapi
|
// TODO put this in /docs/docs/API/Strapi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user