Look at the documentations below to learn more:
Make sure to install the dependencies:
# yarn
yarn install
# npm
npm install
# pnpm
pnpm install
Start the development server on http://localhost:3000
npm run dev
Build the application for production:
npm run build
Locally preview production build:
npm run preview
Build the application before every sam deploy using Lambda preset:
NITRO_PRESET=aws-lambda npm run build
Before every SAM deploy uploads the static files to the S3 bucket:
aws --profile <profile name> --region <region> s3 cp --recursive .output/public s3://<bucket name>/
Executing the first deploy for the SAM applications:
sam deploy --profile <profile name> --region <region> --guided
for subsequent deploys of application SAM:
sam deploy
Invalidate CloudFront cache in front of Nuxt3 application:
aws --profile <profile name> --region <region> cloudfront create-invalidation --distribution-id <distribution id> --paths '/*'
Build the application before every sam deploy using Lambda preset:
NITRO_PRESET=aws-lambda npm run build
Execute a SAM deploy configuring "AutoDeploy" parameter:
sam deploy --parameter-overrides AutoDeploy=ENABLED
The frontend application files will be uploaded from a Lambda function and, when finished, the CloudFront cache will be invalidated.