Skip to content

Commit b77a1d0

Browse files
sommeeeerkhuezyconico974
authored
refactor: get started, config and simple example (#76)
Co-authored-by: khuezy <[email protected]> Co-authored-by: conico974 <[email protected]>
1 parent ed16d3e commit b77a1d0

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

pages/aws/config.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you want to look at a full example, you can check [the full example](/aws/con
2828

2929
### Opt out of default poweredByHeader
3030

31-
By default Next.js will add the [`x-powered-by`]((https://nextjs.org/docs/app/api-reference/next-config-js/poweredByHeader)) header. OpenNext will also add a header `x-opennext`. To opt-out of this, open `next.config.js` and disable the poweredByHeader property in the configuration:
31+
By default Next.js will add the [`x-powered-by`](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader) header. OpenNext will also add a header `x-opennext`. To opt-out of this, open `next.config.js` and disable the poweredByHeader property in the configuration:
3232
```ts
3333
module.exports = {
3434
poweredByHeader: false,

pages/aws/config/simple_example.mdx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@ Here you can find the most common `open-next.config.ts` file examples that you c
44

55
## Streaming with lambda
66

7-
<Callout type="warning" emoji="⚠️">
8-
AWS has a bunch of different implementations of streaming in production. You
9-
might be lucky and have a fully working one, but you might have one that are
10-
not suitable for production. Be aware that there is nothing to do to prevent
11-
AWS from breaking your deployment (same code and same runtime might break from
12-
one day to another) [Thread
13-
1](https://discord.com/channels/983865673656705025/1230482660913184800)
14-
[Thread
15-
2](https://discord.com/channels/983865673656705025/1249368592558985247) <br />{' '}
16-
<br /> On some AWS accounts the response can hang if the body is empty. There
17-
is a workaround for that on OpenNext 3.0.3+, setting environment variable
18-
`OPEN_NEXT_FORCE_NON_EMPTY_RESPONSE` to `"true"`. This will ensure that the
19-
stream body is not empty. <br /> <br />
7+
<Callout type="info" emoji="ℹ️">
208
If you have an issue with streaming send a message on [discord](https://discord.com/channels/1283128968140161065/1286094576788177059)
219
and contact AWS support to let them know of the issue.
2210
</Callout>
@@ -34,6 +22,10 @@ const config = {
3422
export default config;
3523
```
3624

25+
Be aware that there has been some issues in the past with AWS breaking streaming from one day to another. This seems to be resolved now.
26+
[Thread 1](https://discord.com/channels/983865673656705025/1230482660913184800)
27+
[Thread 2](https://discord.com/channels/983865673656705025/1249368592558985247)
28+
3729
## Splitting the server
3830

3931
```ts
@@ -105,7 +97,7 @@ export default config;
10597
## Bundle for a classic Node server (With function splitting)
10698

10799
<Callout type="info" emoji="i">
108-
This is not implemented in sst yet. You'll have to use your own IAC construct to deploy this.
100+
This is not implemented in SST yet. You'll have to use your own IAC construct to deploy this.
109101

110102
Be aware that this uses the exact same system for ISR/SSG as the default lambda setup. So it will have to have all the proper permissions and env variable to interact with S3, DynamoDB and SQS (Or whatever you override it with). You can see [here](/aws/inner_workings/components/server/node#special-overrides) for more details
111103
</Callout>

pages/aws/get_started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For more information, check out the SST docs: https://sst.dev/docs/start/aws/nex
1212

1313
### Other Frameworks
1414

15-
The OpenNext community has contributed deployment options for a few other frameworks.
15+
The OpenNext community has contributed deployment options for a few other frameworks. Many of these are no longer maintained, so newer versions of OpenNext may not be supported.
1616

1717
- CDK (TS): https://github.com/jetbridge/cdk-nextjs
1818
- CDK (TS, Java, Go, Py, .NET): https://github.com/datasprayio/open-next-cdk
@@ -24,7 +24,7 @@ The OpenNext community has contributed deployment options for a few other framew
2424
To use these, you'll need to run the following inside your Next.js app.
2525

2626
```bash
27-
$ npx open-next@latest build
27+
$ npx @opennextjs/aws@latest build
2828
```
2929

3030
If you are using OpenNext to deploy using a framework that is not listed here, please let us know so we can add it to the list.

0 commit comments

Comments
 (0)