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/pages/inner_workings/components/overview.mdx
+30-20Lines changed: 30 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,28 @@
1
-
import { Callout } from'nextra/components'
1
+
import { Callout } from'nextra/components';
2
2
3
3
<Callout>
4
4
This documentation is still a work in progress. Some parts might be missing or incomplete.
5
5
6
-
This is also mostly for advanced use cases (Overriding some default, provide support for another Cloud provider, creating your own IAC component ...), most people won't need to use this.
6
+
This is also mostly for advanced use cases (Overriding some default, provide support for another Cloud provider, creating your own IAC component ...), most people won't need to use this.
7
+
7
8
</Callout>
8
9
10
+
## General
11
+
12
+
- For the node runtime, you need at least Node 18.
13
+
- For the edge runtime, you can use both Node 18+ or cloudflare workers with `node_compat` flag enabled (Cloudflare workers support is experimental)
14
+
- Open-next doesn't work well on Windows. We recommend using WSL2 or a Linux VM.
15
+
9
16
## Backends
10
17
11
18
Every backend is a separate module. The following backends are available:
12
-
- Servers (Node or Edge runtime)
13
-
- Middleware (If manually set to external)
14
-
- Image Optimization
15
-
- Revalidation
16
-
- Warmer
17
-
- Initializer
19
+
20
+
- Servers (Node or Edge runtime)
21
+
- Middleware (If manually set to external)
22
+
- Image Optimization
23
+
- Revalidation
24
+
- Warmer
25
+
- Initializer
18
26
19
27
All these backends can be overrided to fit your needs. They share some common ground for the configuration and the way they are used.
20
28
@@ -56,10 +64,11 @@ export type Wrapper<
56
64
The `handler` is the original handler that is being wrapped. The `converter` is the converter that is being used to convert the event and the result.
57
65
58
66
Here is a list of the provided wrappers:
59
-
-`aws-lambda` - The default AWS Lambda wrapper - It is the default wrapper
60
-
-`aws-lambda-streaming` - The AWS Lambda wrapper with streaming support
61
-
-`node` - The Node wrapper - Create a node server, not suitable for serverless
62
-
-`cloudflare` - The Cloudflare wrapper - For Cloudflare Worker
67
+
68
+
-`aws-lambda` - The default AWS Lambda wrapper - It is the default wrapper
69
+
-`aws-lambda-streaming` - The AWS Lambda wrapper with streaming support
70
+
-`node` - The Node wrapper - Create a node server, not suitable for serverless
71
+
-`cloudflare` - The Cloudflare wrapper - For Cloudflare Worker
63
72
64
73
##### Aws Lambda streaming
65
74
@@ -84,11 +93,12 @@ export type Converter<
84
93
The `convertFrom` method is used to convert the event to the internal event used by the backend internal handler. The `convertTo` method is used to convert the result to the expected result.
85
94
`convertTo` can usually be ignored when using streaming as the result is being streamed directly.
86
95
87
-
Here is a list of the provided converters:
88
-
-`aws-apigw-v2` - The default AWS API Gateway v2 converter - It is the default converter
89
-
-`aws-apigw-v1` - The AWS API Gateway v1 converter
90
-
-`aws-cloudfront` - The AWS CloudFront converter - Used for lambda@edge
91
-
-`edge` - The Edge converter - Converts from `Request` and to `Response`
92
-
-`node` - The Node converter - Converts from `IncomingMessage` and to `ServerResponse`
93
-
-`sqs-revalidate` - The SQS Revalidate converter - Used by default for the revalidation backend
94
-
-`dummy` - The Dummy converter - Does nothing
96
+
Here is a list of the provided converters:
97
+
98
+
-`aws-apigw-v2` - The default AWS API Gateway v2 converter - It is the default converter
99
+
-`aws-apigw-v1` - The AWS API Gateway v1 converter
100
+
-`aws-cloudfront` - The AWS CloudFront converter - Used for lambda@edge
101
+
-`edge` - The Edge converter - Converts from `Request` and to `Response`
102
+
-`node` - The Node converter - Converts from `IncomingMessage` and to `ServerResponse`
103
+
-`sqs-revalidate` - The SQS Revalidate converter - Used by default for the revalidation backend
0 commit comments