---
@@ -31,6 +31,7 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
- [x] Server-side rendering (SSR)
- [x] Incremental static regeneration (ISR)
- [x] Middleware
+- [x] Server actions
- [x] Image optimization
- [x] [NextAuth.js](https://next-auth.js.org)
- [x] Running at edge
@@ -38,7 +39,7 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
## Who is using OpenNext?
-[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext)
+[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext) & [Nike](https://about.nike.com)
@@ -54,9 +55,16 @@ Vercel link: https://open-next.vercel.app
### Environment variables
-- AWS_SDK_DYNAMODB_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for DynamoDB. Defaults to 3.
-- AWS_SDK_S3_MAX_ATTEMPTS: The maximum number of times requests that encounter retryable failures should be attempted for S3. Defaults to 3.
-- 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.
+- `AWS_SDK_DYNAMODB_MAX_ATTEMPTS`: The maximum number of times requests that encounter retryable failures should be attempted for DynamoDB. Defaults to 3.
+- `AWS_SDK_S3_MAX_ATTEMPTS`: The maximum number of times requests that encounter retryable failures should be attempted for S3. Defaults to 3.
+- `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.
+
+### Debug mode
+
+OpenNext can be executed in debug mode by setting the environment variable `OPEN_NEXT_DEBUG=true` before your build.
+
+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.
+
## Contribute
@@ -65,7 +73,7 @@ To run `OpenNext` locally:
1. Clone this repository.
1. Build `open-next`:
```bash
- cd open-next
+ cd packages/open-next
pnpm build
```
1. Run `open-next` in watch mode:
From 70f47f8877d36b7d6339d6fced4fc3c608127163 Mon Sep 17 00:00:00 2001
From: magnus
Date: Fri, 18 Oct 2024 15:31:07 +0200
Subject: [PATCH 2/6] review
---
README.md | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 7b3f80fe7..74e5cf81d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-OpenNext takes the Next.js build output and converts it into a package that can be deployed to any functions as a service platform.
+## Description
+
+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.
## Features
-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!
+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!
- [x] App & Pages Router
- [x] API routes
@@ -35,13 +36,11 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
- [x] Image optimization
- [x] [NextAuth.js](https://next-auth.js.org)
- [x] Running at edge
-- [x] No cold start
+- [x] Almost no coldstart
## Who is using OpenNext?
-[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext) & [Nike](https://about.nike.com)
-
-
+[Gymshark UK](https://uk.gymshark.com), [Udacity](https://engineering.udacity.com/deploying-next-js-on-the-edge-with-sst-is-sst-the-game-changer-its-claimed-to-be-1f05a0abc27c), [TUDN](https://www.tudn.com), [NHS England](https://github.com/nhs-england-tools/terraform-aws-opennext)
## Example
@@ -53,11 +52,9 @@ Vercel link: https://open-next.vercel.app
## Configuration
-### Environment variables
+### Configuration file
-- `AWS_SDK_DYNAMODB_MAX_ATTEMPTS`: The maximum number of times requests that encounter retryable failures should be attempted for DynamoDB. Defaults to 3.
-- `AWS_SDK_S3_MAX_ATTEMPTS`: The maximum number of times requests that encounter retryable failures should be attempted for S3. Defaults to 3.
-- `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.
+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.
### Debug mode
@@ -65,6 +62,8 @@ OpenNext can be executed in debug mode by setting the environment variable `OPEN
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.
+You can read more about the configuration in the [docs](https://opennext.js.org/aws/config)
+
## Contribute
@@ -99,4 +98,4 @@ Special shoutout to [@khuezy](https://github.com/khuezy) and [@conico974](https:
---
-Maintained by [SST](https://sst.dev). Join our community: [Discord](https://sst.dev/discord) | [YouTube](https://www.youtube.com/c/sst-dev) | [Twitter](https://twitter.com/SST_dev)
+Maintained by [SST](https://sst.dev). Join our community: [Discord](https://discord.gg/AWyhAu8q) | [YouTube](https://www.youtube.com/c/sst-dev) | [Twitter](https://twitter.com/SST_dev)
From ef687e856d151f257e80921a462d981aee8498f9 Mon Sep 17 00:00:00 2001
From: magnus
Date: Fri, 18 Oct 2024 23:36:44 +0200
Subject: [PATCH 3/6] review
---
README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 74e5cf81d..5f4c0d2e2 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
- [x] Image optimization
- [x] [NextAuth.js](https://next-auth.js.org)
- [x] Running at edge
-- [x] Almost no coldstart
+- [*] [Almost no coldstart](#coldstart)
## Who is using OpenNext?
@@ -85,6 +85,13 @@ To run `OpenNext` locally:
path/to/open-next/packages/open-next/dist/index.js build
```
+### Coldstart
+
+OpenNext provide you with a warmer function that can be used to reduce cold start.
+
+On Lambda, there is multiple scenario where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more request than warm instance 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.
+
## Acknowledgements
We are grateful for the projects that inspired OpenNext and the amazing tools and libraries developed by the community:
From 8a6654f15a911f00434b055bca6fb74f2f7c1748 Mon Sep 17 00:00:00 2001
From: magnus
Date: Fri, 18 Oct 2024 23:41:01 +0200
Subject: [PATCH 4/6] fix spacing
fix plural tone
fix plural tone
---
README.md | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 5f4c0d2e2..f203d47f3 100644
--- a/README.md
+++ b/README.md
@@ -87,10 +87,9 @@ To run `OpenNext` locally:
### Coldstart
-OpenNext provide you with a warmer function that can be used to reduce cold start.
+OpenNext provide you with a warmer function that can be used to reduce cold start.
-On Lambda, there is multiple scenario where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more request than warm instance 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.
+On Lambda, there is multiple scenarios where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more request than warm instance 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.
## Acknowledgements
From 287ee2242c4ebef749d473dec997751d059eb5fb Mon Sep 17 00:00:00 2001
From: magnus
Date: Fri, 18 Oct 2024 23:46:37 +0200
Subject: [PATCH 5/6] fix plural tone
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f203d47f3..7c435f50b 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,7 @@ To run `OpenNext` locally:
OpenNext provide you with a warmer function that can be used to reduce cold start.
-On Lambda, there is multiple scenarios where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more request than warm instance 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.
+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 request than warm instance 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.
## Acknowledgements
From f0f502cacc67eab291bd68a72fe41ba73327628c Mon Sep 17 00:00:00 2001
From: magnus
Date: Fri, 18 Oct 2024 23:56:50 +0200
Subject: [PATCH 6/6] fix plural tone
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7c435f50b..7fea21c27 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,7 @@ To run `OpenNext` locally:
OpenNext provide you with a warmer function that can be used to reduce cold start.
-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 request than warm instance 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.
+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.
## Acknowledgements