Skip to content

Commit 2695e43

Browse files
authored
Merge branch 'main' into main
2 parents 3ea35bf + 4b5dcd5 commit 2695e43

38 files changed

+161
-144
lines changed

components/midori/editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ onMounted(() => {
176176
<p
177177
class="text-xl md:text-2xl leading-relaxed text-gray-400 text-left md:text-center w-full max-w-2xl"
178178
>
179-
Being WinterCG compliance, Elysia can run in your browser!
179+
Being WinterCG compliant, Elysia can run in your browser!
180180
<br />
181181
Edit the code and see live update immediately.
182182
</p>

components/midori/openapi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Prism from 'vue-prism-component'
33
44
const code = `import { Elysia, t } from 'elysia'
55
import { swagger } from '@elysiajs/swagger'
6-
import { user, feed } from './controllers'
6+
import { users, feed } from './controllers'
77
88
new Elysia()
99
.use(swagger())

docs/blog/elysia-06.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ By this, Elysia is partially follows WinterCG compliance as we are optimized to
122122

123123
This allows any framework and code that is WinterCG compliance to be run together in theory, an implementation is proved by [Hono](https://honojs.dev) which introduce the **.mount** method to [runs multiple framework together in one codebase](https://twitter.com/honojs/status/1684839623355490304), including Remix, Elysia, Itty Router, and Hono itself in a simple function.
124124

125-
By this, we implemented the same logic for Elysia by introducing `.mount` method to runs any framework or code that WinterCG compliance.
125+
By this, we implemented the same logic for Elysia by introducing `.mount` method to runs any framework or code that is WinterCG compliant.
126126

127127
To use `.mount`, [simply pass a `fetch` function](https://twitter.com/saltyAom/status/1684786233594290176):
128128
```ts
@@ -146,7 +146,7 @@ By default, this declaration are used by:
146146
- Netlify Edge Function
147147
- Remix Function Handler
148148
149-
Which means you can run all of the above code to interlop with Elysia all in a single server, or reused and existing function all in one deployment, no need to setting up Reverse Proxy for handling multiple server.
149+
Which means you can run all of the above code to interlop with Elysia all in a single server, or re-used and existing function all in one deployment, no need to setting up Reverse Proxy for handling multiple server.
150150
151151
If the framework also support a **.mount** function, you can deeply nested a framework that support it infinitely.
152152
```ts
@@ -163,7 +163,7 @@ const main = new Elysia()
163163
.listen(3000)
164164
```
165165

166-
You can even reused multiple existing Elysia project in your server.
166+
You can even re-used multiple existing Elysia project in your server.
167167

168168
```ts
169169
import A from 'project-a/elysia'

docs/blog/elysia-supabase.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ const authen = (app: Elysia) =>
326326
Great! We have just used name reference on our route!
327327

328328
::: tip
329-
If you found yourself with a long schema, you can declare them in a separate file and reuse them in any Elysia route to put the focus back on business logic instead.
329+
If you found yourself with a long schema, you can declare them in a separate file and re-use them in any Elysia route to put the focus back on business logic instead.
330330
:::
331331

332332
## Storing user session
@@ -478,7 +478,7 @@ And that's it!
478478

479479
We have just implemented user authentication which is fun and game, but now you might find yourself in need of authorization for each route, and duplicating the same code to check for cookies all over the place.
480480

481-
Luckily, we can reuse the function in Elysia.
481+
Luckily, we can re-use the function in Elysia.
482482

483483
Let's paint the example by saying that we might want a user to create a simple blog post that can have the database schema as the following:
484484

docs/blog/with-prisma.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ This will return a JSON equivalent of our custom error message when a unique con
283283
Allowing us to seemlessly define any custom error from Prisma error.
284284

285285
## Bonus: Reference Schema
286-
When our server grow complex and type becoming more redundant and become a boilerplate, inlining an Elysia type can be improved by using **Reference Schmea**.
286+
When our server grow complex and type becoming more redundant and become a boilerplate, inlining an Elysia type can be improved by using **Reference Schema**.
287287

288288
To put it simply, we can named our schema and reference the type by using the name.
289289

docs/concept/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ new Elysia()
5252
```
5353

5454
::: tip
55-
For providing WebSocket, please use [`@elysiajs/websocket`](https://github.com/elysiajs/elysia-websocket)
55+
For providing WebSocket, please use [`WebSocket`](/patterns/websocket)
5656
:::
5757

5858
## Custom Port

docs/concept/derive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ head:
1717
# Derive
1818
Just like _state_ and _decorate_, derive allows you to customize `Context` based on existing `Context` as `Context.store`.
1919

20-
This is useful when you to need to create a value based on an existing value reactively.
20+
This is useful when you need to create a value based on an existing value reactively.
2121

2222
### Example
2323
```typescript

docs/concept/explicit-body.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ app.post('/', ({ body }) => body, {
3131
})
3232
```
3333

34-
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON, Elysia then pick the JSON body parser function ahead of time and try to parse the body.
34+
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON. Elysia then picks the JSON body parser function ahead of time and tries to parse the body.
3535

36-
Here's a criteria that Elysia use to pick up type of body parser
36+
Here's a criteria that Elysia uses to pick up type of body parser
3737

3838
- `application/json`: body typed as `t.Object`
3939
- `multipart/form-data`: body typed as `t.Object`, and is 1 level deep with `t.File`
@@ -43,7 +43,7 @@ Here's a criteria that Elysia use to pick up type of body parser
4343
This allows Elysia to optimize body parser ahead of time, and reduce overhead in compile time.
4444

4545
## Explicit Content Type
46-
However, is some scenario that Elysia fail to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
46+
However, in some scenario if Elysia fails to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
4747

4848
```ts
4949
app.post('/', ({ body }) => body, {
@@ -52,7 +52,7 @@ app.post('/', ({ body }) => body, {
5252
})
5353
```
5454

55-
This allows you to control Elysia behavior for picking body parser function to fits your need in complex scenario.
55+
This allows you to control Elysia behavior for picking body parser function to fit your needs in a complex scenario.
5656

5757
`type` may be one of the following:
5858
```ts
@@ -71,4 +71,4 @@ type ContentType = |
7171
| 'application/x-www-form-urlencoded'
7272
```
7373
74-
You can extends Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).
74+
You can extend Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).

docs/concept/guard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Suppose you have many shared local hooks.
2121
Instead of duplicating an existing hook, you can define a shared hook scope using `guard`.
2222

2323
---
24-
**Guard** lets you inject multiple life-cycle events into multiple routes at once. Guard is useful when you have listen to same life-cycle events in the multiple routes, for example: logging, schema validation, or error handling.
24+
**Guard** lets you inject multiple life-cycle events into multiple routes at once. Guard is useful when you have to listen to the same life-cycle event in multiple routes, for example: logging, schema validation, or error handling.
2525

2626
To encapsulate all hooks into the scope, instead of writing:
2727
```typescript

docs/concept/numeric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ head:
1919

2020
Sometime you might find yourself in need of numeric string like extracting path parameter, but it's typed as string and need to be convert to number.
2121

22-
Using Elysia's `transform` life-cycle, you can manually parse number to string and reuse the transform function in other handler as well.
22+
Using Elysia's `transform` life-cycle, you can manually parse number to string and re-use the transform function in other handler as well.
2323

2424
```ts
2525
app.get('/id/:id', ({ params: { id } }) => id, {

0 commit comments

Comments
 (0)