Skip to content

Commit ec2717a

Browse files
committed
📘 doc: update ecosystem
2 parents da13132 + 62481f9 commit ec2717a

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

components/landing/heading.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</a>
6565
</div>
6666
<small class="text-white text-lg opacity-65"
67-
>ps. it take &lt; 30 seconds to start</small
67+
>ps. it takes &lt; 30 seconds to start</small
6868
>
6969
</section>
7070
<section

docs/integrations/static-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import { Elysia } from 'elysia'
3030
import { staticPlugin } from '@elysia/static'
3131

3232
new Elysia()
33-
.use(staticPlugin, {
34-
path: 'public'
35-
})
33+
.use(staticPlugin({
34+
assets: 'public'
35+
}))
3636
.listen(8080)
3737
```

docs/patterns/method-chaining.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Using method chaining will help save that new type refernce.
2323

2424
For example:
2525
```typescript
26-
const = new Elysia()
26+
const app = new Elysia()
2727
.state('build', 1)
2828
// Store is strictly typed
2929
.get('/', ({ store: { build } }) => build)

docs/patterns/websocket.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ head:
1515
---
1616

1717
# WebSocket
18-
Elysia WebSocket is extending Bun WebSocket which use [uWebSocket](https://github.com/uNetworking/uWebSockets) under the hood.
18+
Elysia WebSocket extends Bun's WebSocket which uses [uWebSocket](https://github.com/uNetworking/uWebSockets) under the hood.
1919

20-
To start using WebSocket, register the WebSocket plugin, and start declaring WebSocket route with `.ws`.
20+
To start working with a WebSocket, register the Elysia WebSocket plugin, and declare a WebSocket route with `.ws`.
2121
```typescript
2222
import { Elysia, ws } from 'elysia'
2323

@@ -31,14 +31,14 @@ new Elysia()
3131
.listen(8080)
3232
```
3333

34-
WebSocket route is extending Bun WebSocket configuration, for additional configuration please refers to [Bun's WebSocket](https://bun.sh/docs/api/websockets).
3534

36-
Just like normal route, WebSocket also accepts **schema** to strictly type and validate requests.
35+
Just like normal route, WebSockets also accepts a **schema** object to strictly type and validate requests.
3736

3837
## Configuration
39-
This plugin extends config from [Bun WebSocket](https://github.com/oven-sh/bun#websockets-with-bunserve)
4038

41-
Below is a config extends from [Bun WebSocket](https://github.com/oven-sh/bun#websockets-with-bunserve)
39+
Elysia's WebSocket plugin extends Bun's WebSocket configuration so if you wish to configure the websocket you can refer to [Bun's WebSocket documentation](https://bun.sh/docs/api/websockets) to learn more about this.
40+
41+
Below is a config that extends from [Bun WebSocket](https://github.com/oven-sh/bun#websockets-with-bunserve)
4242

4343
### perMessageDeflate
4444
@default `false`
@@ -65,11 +65,11 @@ The maximum number of bytes that can be buffered for a single connection.
6565

6666
Close the connection if the backpressure limit is reached.
6767

68-
## Method
69-
Below are the new methods register by the plugin
68+
## Methods
69+
Below are the new methods that are available to the WebSocket plugin
7070

7171
## ws
72-
Create websocket handler
72+
Create a websocket handler
7373

7474
Example:
7575
```typescript
@@ -168,8 +168,11 @@ drain(
168168
): this
169169
```
170170

171+
## parse
172+
`Parse` middleware to parse the request before upgrading the HTTP connection to WebSocket.
173+
171174
## beforeHandle
172-
`Before Handle` middleware which execute before upgrade HTTP connection to WebSocket.
175+
`Before Handle` middleware which execute before upgrading the HTTP connection to WebSocket.
173176

174177
Ideal place for validation.
175178

docs/plugins/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ That's why Elysia is creating pre-built common pattern plugin for convinient usa
4343
## Community plugins:
4444
- [OAuth2](https://github.com/bogeychan/elysia-oauth2) - handle OAuth 2.0 authorization code flow
4545
- [Rate Limit](https://github.com/rayriffy/elysia-rate-limit) - simple lightweight rate limiter
46+
- [Logger](https://github.com/bogeychan/elysia-logger) - pino logging elysia middleware
4647
- [Elysia Polyfills](https://github.com/bogeychan/elysia-polyfills) - run Elysia ecosystem on Node and Deno
4748
- [Elysia Lambda](https://github.com/TotalTechGeek/elysia-lambda) - deploy Elysia on AWS Lambda
4849

docs/plugins/trpc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Swagger Plugin - Elysia.js
2+
title: tRPC Plugin - Elysia.js
33
head:
44
- - meta
55
- property: 'og:title'
6-
content: Swagger Plugin - Elysia.js
6+
content: tRPC Plugin - Elysia.js
77

88
- - meta
99
- name: 'description'

0 commit comments

Comments
 (0)