https://github.com/stacktape/nextjs-blog
Next.js deployment options comparison
https://github.com/stacktape/nextjs-blog
Last synced: 3 months ago
JSON representation
Next.js deployment options comparison
- Host: GitHub
- URL: https://github.com/stacktape/nextjs-blog
- Owner: stacktape
- Created: 2023-11-22T11:35:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-12T11:18:47.000Z (about 1 year ago)
- Last Synced: 2025-01-07T23:13:31.460Z (5 months ago)
- Language: HTML
- Size: 1.52 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository is a Next.js project used for testing Next.js framework alongside AWS Services: Fargate, Lambda, Lambda@Edge.
The testing was summarized in the blog post, whose contents are also part of this repository in [BLOG.md](_blog/BLOG.md).
## Contents
Besides the Next.js project itself (created by `npx create-next-app@latest`) it also contains:
### Stacktape configuration files
Repo contains Stacktape configuration files to **deploy the Next.js app in multiple ways into your own AWS account**:
- Deploy in Fargate container (file `env-container.stacktape.yml`)
- Deploy in Lambda function (file `env-lambda.stacktape.yml`)
- Deploy in Lambda@Edge function (file `env-edge-lambda.stacktape.yml`)You can deploy any of these environments easily using [Stacktape](https://stacktape.com/) command:
```bash
stacktape deploy --configPath <> --stage test
```Additionally, the file `_helper-env/ec2-instance.stacktape.yml` can be used to deploy an EC2 instance (used for sending requests and testing the Next.js app in our tests).
You can connect easily to the deployed EC2 instance using the command:
```bash
stacktape bastion:session --configPath _helper-env/ec2-instance.stacktape.yml --stage test
```### Testing scripts
Folder `_test-scripts` contains scripts that were copied to our helper EC2 instances and used for testing.
Running `test2.js` script requires you to have [autocannon](https://www.npmjs.com/package/autocannon) npm package installed on the system.
### Blog post content and resource
The testing was summarized in the blog post, whose contents are also part of this repository in [BLOG.md](_blog/BLOG.md).