You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/at-glance.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ head:
7
7
8
8
- - meta
9
9
- name: 'description'
10
-
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience unified type, and end-to-end type safety while maintaining excellent performance.
10
+
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience with unified types, and end-to-end type safety while maintaining excellent performance.
11
11
12
12
- - meta
13
13
- property: 'og:description'
14
-
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience unified type, and end-to-end type safety while maintaining excellent performance.
14
+
content: Designed with ergonomic design, extensive support for TypeScript, modern JavaScript API, optimized for Bun. Offers a unique experience with unified types, and end-to-end type safety while maintaining excellent performance.
Copy file name to clipboardExpand all lines: docs/eden/overview.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ head:
7
7
8
8
- - meta
9
9
- name: 'description'
10
-
content: Elysia supports end-to-end type safety with Elysia Eden since start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
10
+
content: Elysia supports end-to-end type safety with Elysia Eden from the start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
11
11
12
12
- - meta
13
13
- property: 'og:description'
14
-
content: Elysia supports end-to-end type safety with Elysia Eden since start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
14
+
content: Elysia supports end-to-end type safety with Elysia Eden from the start. End-to-end type-safety refers to a system in which every component of the system is checked for type consistency, meaning that data is passed between components only if the types of the data are compatible.
15
15
---
16
16
17
17
# End-to-End Type Safety
@@ -23,14 +23,14 @@ End-to-end type safety is like making sure all the pieces of the track match up
23
23
24
24
For a framework to have end-to-end type safety means you can connect client and server in a type-safe manner.
25
25
26
-
Elysia provide end-to-end type safety **without code generation** out of the box with RPC-like connector, **Eden**
26
+
Elysia provides end-to-end type safety **without code generation** out of the box with an RPC-like connector, **Eden**
@@ -52,20 +52,20 @@ Hover over variable and function to see type definition.
52
52
Elysia allows you to change the type on the server and it will be instantly reflected on the client, helping with auto-completion and type-enforcement.
53
53
54
54
## Eden
55
-
Eden is a RPC-like client to connect Elysia **end-to-end type safety** using only TypeScript's type inference instead of code generation.
55
+
Eden is an RPC-like client to connect Elysia with**end-to-end type safety** using only TypeScript's type inference instead of code generation.
56
56
57
-
Allowing you to sync client and server types effortlessly, weighing less than 2KB.
57
+
It allows you to sync client and server types effortlessly, weighing less than 2KB.
58
58
59
-
Eden is consists of 2 modules:
59
+
Eden consists of 2 modules:
60
60
1. Eden Treaty **(recommended)**: an improved version RFC version of Eden Treaty
61
-
2. Eden Fetch: Fetch-like client with type safety.
61
+
2. Eden Fetch: Fetch-like client with type safety
62
62
63
63
Below is an overview, use-case and comparison for each module.
64
64
65
65
## Eden Treaty (Recommended)
66
66
Eden Treaty is an object-like representation of an Elysia server providing end-to-end type safety and a significantly improved developer experience.
67
67
68
-
With Eden Treaty we can connect interact Elysia server with full-type support and auto-completion, error handling with type narrowing, and creating typesafe unit test.
68
+
With Eden Treaty we can interact with an Elysia server with full-type support and auto-completion, error handling with type narrowing, and create type-safe unit tests.
Copy file name to clipboardExpand all lines: docs/essential/handler.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ head:
7
7
8
8
- - meta
9
9
- name: 'description'
10
-
content: handler is a function that responds to the request for each route. Accepting request information and returning a response to the client. Handler can be registered through Elysia.get / Elysia.post
10
+
content: A handler is a function that responds to the request for each route. Accepting request information and returning a response to the client. Handler can be registered through Elysia.get / Elysia.post
11
11
12
12
- - meta
13
13
- property: 'og:description'
14
-
content: handler is a function that responds to the request for each route. Accepting request information and returning a response to the client. Handler can be registered through Elysia.get / Elysia.post
14
+
content: A handler is a function that responds to the request for each route. Accepting request information and returning a response to the client. Handler can be registered through Elysia.get / Elysia.post
15
15
---
16
16
17
17
<scriptsetup>
@@ -87,11 +87,11 @@ const demo7 = new Elysia()
87
87
88
88
# Handler
89
89
90
-
Handler is a function that responds to the request for each route.
90
+
A handler is a function that responds to the request for each route.
91
91
92
92
Accepting request information and returning a response to the client.
93
93
94
-
Altenatively, handler is also known as a **Controller** in other frameworks.
94
+
Alternatively, a handler is also known as a **Controller** in other frameworks.
Copy file name to clipboardExpand all lines: docs/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ head:
9
9
10
10
- - meta
11
11
- name: 'description'
12
-
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and first class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia got you covered, start building next generation TypeScript web servers today.
12
+
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.
13
13
14
14
- - meta
15
15
- property: 'og:description'
16
-
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and first class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia got you covered, start building next generation TypeScript web servers today.
16
+
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.
Elysia will work normally as expected because of WinterCG compliance, however, some plugins like **Elysia Static** may not work if you are running Nextjs on Node.
41
+
Elysia will work normally as expected because of WinterCG compliance, however, some plugins like **Elysia Static** may not work if you are running Next.js on Node.
42
42
43
-
You can treat the Elysia server as a normal Nextjs API route.
43
+
You can treat the Elysia server as a normal Next.js API route.
44
44
45
45
With this approach, you can have co-location of both frontend and backend in a single repository and have [End-to-end type safety with Eden](https://elysiajs.com/eden/overview.html) with both client-side and server action
46
46
47
-
Please refer to [Nextjs Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers#static-route-handlers) for more information.
47
+
Please refer to [Next.js Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers#static-route-handlers) for more information.
Copy file name to clipboardExpand all lines: docs/integrations/openapi.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,14 @@ const app = new Elysia()
33
33
.use(swagger())
34
34
```
35
35
36
-
By default, Elysia use OpenAPI V3 schema and [Scalar UI](http://scalar.com) by default
36
+
By default, Elysia uses OpenAPI V3 schema and [Scalar UI](http://scalar.com)
37
37
38
38
For Swagger plugin configuration, see the [Swagger plugin page](/plugins/swagger).
39
39
40
40
## Route definitions
41
41
We add route information by providing a schema type.
42
42
43
-
However, sometime defining a type only isn't clear what the route might work. You can use `schema.detail` fields to explictly define what the route is all about.
43
+
However, sometimes defining only a type does not make it clear about what the route might do. You can use `schema.detail` fields to explicitly define what the route is all about.
44
44
45
45
```typescript
46
46
import { Elysia, t } from'elysia'
@@ -77,7 +77,7 @@ Detail is then passed to Swagger to put the description to Swagger route.
77
77
78
78
The detail field is an object that can be use to describe information about the route for API documentation.
79
79
80
-
Which may contains the following fields:
80
+
It may contain the following fields:
81
81
82
82
### tags
83
83
An array of tags for the operation. Tags can be used for logical grouping of operations by resources or any other qualifier.
Copy file name to clipboardExpand all lines: docs/migrate/from-express.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,11 @@ head:
13
13
14
14
- - meta
15
15
- name: 'description'
16
-
content: This guide is for Express users who want to see a differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
16
+
content: This guide is for Express users who want to see the differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
17
17
18
18
- - meta
19
19
- property: 'og:description'
20
-
content: This guide is for Express users who want to see a differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
20
+
content: This guide is for Express users who want to see the differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
21
21
---
22
22
23
23
<scriptsetup>
@@ -30,11 +30,11 @@ import Benchmark from '../components/fern/benchmark-express.vue'
30
30
31
31
# From Express to Elysia
32
32
33
-
This guide is for Express users who want to see a differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
33
+
This guide is for Express users who want to see the differences from Express including syntax, and how to migrate your application from Express to Elysia by example.
34
34
35
35
**Express** is a popular web framework for Node.js, and widely used for building web applications and APIs. It is known for its simplicity and flexibility.
36
36
37
-
**Elysia** is an ergonomic web framework for Bun, Node.js, and runtime that support Web Standard API. Designed to be ergonomic and developer-friendly with a focus on **sounds type safety** and performance.
37
+
**Elysia** is an ergonomic web framework for Bun, Node.js, and runtimes that support Web Standard API. Designed to be ergonomic and developer-friendly with a focus on **sound type safety** and performance.
38
38
39
39
## Performance
40
40
Elysia has significant performance improvements over Express thanks to native Bun implementation, and static code analysis.
@@ -43,7 +43,7 @@ Elysia has significant performance improvements over Express thanks to native Bu
43
43
44
44
## Routing
45
45
46
-
Express and Elysia has similar routing syntax, using `app.get()` and `app.post()` methods to define routes and similar path parameters syntax.
46
+
Express and Elysia have similar routing syntax, using `app.get()` and `app.post()` methods to define routes and similar path parameter syntax.
0 commit comments