Run the following command to create your own copy of this application:
npx scaffoldly create app --template node-nextjs-export
This application was generated with the following command:
npx create-next-app@latest node-nextjs-export
✨ No modifications or SDKs were made or added to the code to "make it work" in AWS Lambda.
Check out our other examples and Learn more at scaffoldly.dev!
https://jtzom2obx3owx4gn4vluichvze0frzcn.lambda-url.us-east-1.on.aws
First, next.config.mjs
was updated
We've set output
to be export
:
export
mode creates a Single Page Application (SPA) with no backend- The
next
binary is no longer needed to start the app
const nextConfig = {
output: "export",
};
In the project's package.json
file, the scaffoldly
configuration was added:
- The
serve
binary is installed to serve the static HTML - The
start
command now usesserve out
to serve the static HTML
See the Scaffoldly Docs for additional configuration directives.
npx scaffoldly deploy
See the Scaffoldly Docs for details on the scaffoldly deploy
command.
🚀 Deployment Complete!
🆔 App Identity: arn:aws:iam::123456789012:role/node-nextjs-export-c2f26520
📄 Env Files: .env.main, .env
📦 Image Size: 225.36 MB
🌎 URL: https://jtzom2obx3owx4gn4vluichvze0frzcn.lambda-url.us-east-1.on.aws
A scaffoldly.yml
was added to .github/workflows
so that a push will trigger a deploy
name: Scaffoldly Deploy
# ... snip ...
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
uses: scaffoldly/scaffoldly@v1
with:
secrets: ${{ toJSON(secrets) }}
See the Scaffoldly Docs for additional GitHub Actions directives.
Join our Discussions on GitHub. Join our Community on Discord.
This code is licensed under the Apache-2.0 license.
The scaffoldly
toolchain is licensed under the FSL-1.1-Apache-2.0 license.
Copyright 2024 Scaffoldly LLC