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
OpenNext takes the Next.js build output and converts it into a package that can be deployed to any functions as a service platform.
20
+
## Description
21
+
22
+
OpenNext takes the Next.js build output and converts it into packages that can be deployed across a variety of environments. Natively OpenNext has support for AWS Lambda, and classic Node.js Server.
22
23
23
24
## Features
24
25
25
-
OpenNext aims to support all Next.js 14 features. Some features are work in progress. Please open a [new issue](/issues/new) to let us know!
26
+
OpenNext aims to support all Next.js 14 features. Some features are work in progress. If you are running into any problems make sure to check the [docs](https://opennext.js.org/aws) first before you open a [new issue](/issues/new) or visit our [Discord](https://discord.gg/AWyhAu8q) to let us know!
26
27
27
28
-[x] App & Pages Router
28
29
-[x] API routes
@@ -31,17 +32,16 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
In the `example` folder, you can find a Next.js benchmark app. It contains a variety of pages that each test a single Next.js feature. The app is deployed to both Vercel and AWS using [SST](https://docs.sst.dev/start/nextjs).
For personalisation you need to create a file `open-next.config.ts` at the same place as your `next.config.js`, and export a default object that satisfies the `OpenNextConfig` interface. It is possible to not have an open-next.config.ts file, the default configuration will then be applied automatically.
58
+
59
+
### Debug mode
60
+
61
+
OpenNext can be executed in debug mode by setting the environment variable `OPEN_NEXT_DEBUG=true` before your build.
62
+
63
+
This will output A LOT of additional logs to the console. This also disable minifying in esbuild, and add source maps to the output. This can result in code that might be up to 2-3X larger than the production build. Do **not** enable this in production.
64
+
65
+
You can read more about the configuration in the [docs](https://opennext.js.org/aws/config)
56
66
57
-
- AWS_SDK_DYNAMODB_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for DynamoDB. Defaults to 3.
58
-
- AWS_SDK_S3_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for S3. Defaults to 3.
59
-
- DYNAMO_BATCH_WRITE_COMMAND_CONCURRENCY: The number of concurrent batch write commands to DynamoDB. Defaults to 4 in an effort to leave plenty of DynamoDB write request capacity for the production load.
OpenNext provide you with a warmer function that can be used to reduce cold start.
91
+
92
+
On Lambda, there are multiple scenarios where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more requests than warm instances you'll get a cold start. Also NextJs lazy load the routes, so even if you hit a warm instance, this specific route might not have been loaded yet.
93
+
81
94
## Acknowledgements
82
95
83
96
We are grateful for the projects that inspired OpenNext and the amazing tools and libraries developed by the community:
@@ -91,4 +104,4 @@ Special shoutout to [@khuezy](https://github.com/khuezy) and [@conico974](https:
0 commit comments