File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,13 @@ const app = new Elysia()
33
33
.listen (8080 )
34
34
```
35
35
36
- Plugin can be registered by using ` use ` method.
36
+ Plugins can be registered by using ` use ` method.
37
37
38
- Registering a plugin will combine types between plugin and current instance, and the scope of hooks and schema get merged as well.
38
+ Registering a plugin will combine types between the plugin and current instance, and the scope of hooks and schema get merged as well.
39
39
40
40
## Separate file
41
- Using plugin pattern, you can define decouple your logic into a separate file.
41
+
42
+ Using the plugin pattern, you can define and decouple your logic into a separate file.
42
43
43
44
``` ts
44
45
// plugin.ts
@@ -64,11 +65,11 @@ import { plugin } from './plugin'
64
65
const app = new Elysia ().use (plugin ).listen (8080 )
65
66
```
66
67
67
- Functional callback will allow user to access main instance values like routes schema, store.
68
+ Functional callback will allow user to access main instance values like routes, schema, store, etc .
68
69
69
70
## Config
70
71
71
- You can customize plugin by creating function to return callback which accepts Elysia.
72
+ You can customize a plugin by creating function to return callback which accepts Elysia.
72
73
73
74
``` typescript
74
75
import { Elysia } from ' elysia'
You can’t perform that action at this time.
0 commit comments