Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit e058d25

Browse files
author
true
committed
docs: updated readme
1 parent 1bc4310 commit e058d25

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

Diff for: README.md

+11-28
Original file line numberDiff line numberDiff line change
@@ -65,41 +65,24 @@ Lambda is designed to serve `_next/image*` route in NextJS stack and replaces th
6565

6666
### Via CDK
6767

68-
See `NextStandaloneStack` construct in `lib/construct.ts`.
68+
See `NextStandaloneStack` construct in `cdk/example.ts`.
6969

70-
You can easily create `cdk/app.ts` and use following code:
71-
```
72-
#!/usr/bin/env node
73-
import 'source-map-support/register'
74-
import * as cdk from 'aws-cdk-lib'
75-
import * as path from 'path'
76-
77-
import { NextStandaloneStack } from '@sladg/nextjs-lambda'
78-
79-
const assetsZipPath = path.resolve(__dirname, '../next.out/assetsLayer.zip')
80-
const codeZipPath = path.resolve(__dirname, '../next.out/code.zip')
81-
const dependenciesZipPath = path.resolve(__dirname, '../next.out/dependenciesLayer.zip')
82-
83-
const app = new cdk.App()
8470

85-
new NextStandaloneStack(app, 'StandaloneNextjsStack-2', {
86-
assetsZipPath,
87-
codeZipPath,
88-
dependenciesZipPath,
89-
})
90-
```
71+
#### Benchmark
9172

92-
This imports pre-made construct, you only need to worry about paths to outputed zip files from CLI `pack` command.
73+
- Creation of stack: 385sec (6min 25sec)
74+
- Run #2 436sec (7min 16sec)
75+
- Run #3 383sec (6min 23sec)
9376

94-
> More granular CDK construct coming soon.
9577

96-
#### Benchmark
78+
- Deletion of stack: 262sec (4min 22sec)
79+
- Run #2 319sec (5m 19sec)
9780

98-
Creation of stack: 385sec (6min 25sec)
99-
Run #2 436sec (7min 16sec)
100-
Deletion of stack: 262sec (4min 22sec)
101-
Update of stack:
10281

82+
- Update of stack: 92sec (1min 32sec)
83+
- Run #2 5sec (no changes)
84+
- Run #3 3sec (no changes)
85+
- Run #4 164sec (2min 44sec)
10386

10487
### Sharp layer
10588

0 commit comments

Comments
 (0)