Skip to content

Commit 6416c81

Browse files
authored
update readme (opennextjs#569)
* update readme * review * review * fix spacing fix plural tone fix plural tone * fix plural tone * fix plural tone
1 parent 6afd7ab commit 6416c81

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="https://open-next.js.org">
2+
<a href="https://opennext.js.org">
33
<picture>
44
<source media="(prefers-color-scheme: dark)" srcset="docs/public/logo-dark.svg">
55
<img alt="OpenNext" src="docs/public/logo-light.svg" width="300" />
@@ -8,21 +8,22 @@
88
</p>
99
<p align="center">
1010
<a href="https://sst.dev/discord"><img alt="Discord" src="https://img.shields.io/discord/983865673656705025?style=flat-square" /></a>
11-
<a href="https://www.npmjs.com/package/open-next"><img alt="npm" src="https://img.shields.io/npm/v/open-next.svg?style=flat-square" /></a>
11+
<a href="https://www.npmjs.com/package/@opennextjs/aws"><img alt="npm" src="https://img.shields.io/npm/v/@opennextjs/aws.svg?style=flat-square" /></a>
1212
</p>
1313

1414
---
1515

1616
<p align="center">
17-
<a href="https://open-next.js.org/">Docs</a> |
18-
<a href="#example">Example</a>
17+
<a style="font-size: 2.5rem;font-weight:bold;" href="https://open-next.js.org/aws">Docs</a>
1918
</p>
2019

21-
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.
2223

2324
## Features
2425

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!
2627

2728
- [x] App & Pages Router
2829
- [x] API routes
@@ -31,17 +32,16 @@ OpenNext aims to support all Next.js 14 features. Some features are work in prog
3132
- [x] Server-side rendering (SSR)
3233
- [x] Incremental static regeneration (ISR)
3334
- [x] Middleware
35+
- [x] Server actions
3436
- [x] Image optimization
3537
- [x] [NextAuth.js](https://next-auth.js.org)
3638
- [x] Running at edge
37-
- [x] No cold start
39+
- [*] [Almost no coldstart](#coldstart)
3840

3941
## Who is using OpenNext?
4042

4143
[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)
4244

43-
44-
4545
## Example
4646

4747
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).
@@ -52,11 +52,18 @@ Vercel link: https://open-next.vercel.app
5252

5353
## Configuration
5454

55-
### Environment variables
55+
### Configuration file
56+
57+
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)
5666

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.
6067

6168
## Contribute
6269

@@ -65,7 +72,7 @@ To run `OpenNext` locally:
6572
1. Clone this repository.
6673
1. Build `open-next`:
6774
```bash
68-
cd open-next
75+
cd packages/open-next
6976
pnpm build
7077
```
7178
1. Run `open-next` in watch mode:
@@ -78,6 +85,12 @@ To run `OpenNext` locally:
7885
path/to/open-next/packages/open-next/dist/index.js build
7986
```
8087

88+
### Coldstart
89+
90+
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+
8194
## Acknowledgements
8295

8396
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:
91104

92105
---
93106

94-
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)
107+
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)

0 commit comments

Comments
 (0)