FrontEnd/React
nextjs 배포
아라한사
2021. 1. 18. 15:54
1. Aws amplify
nextjs - aws amplify 로 배포.
밑의 주소를 보고서 하면 되는데
dev.to/dabit3/5-minute-tutorial-deploying-a-next-app-with-aws-amplify-hosting-5199
⚡️ 5 Minute Tutorial: Deploying a NextJS app with AWS Amplify Hosting
How to deploy a Next app to AWS with Amplify Hosting
dev.to
단 .. SSR 이 되지 않는다. 저기서 형태는
build 명령어가 build 한 뒤에 export 하는 형태로
SSG 라고볼수가 있다.
그리고 동적라우팅을 amplify 에서 다시 설정을 해줘야 한다.
router.query 에서 query 받아오는 것도 잘 안된다.
2안. Serverless 를 통한 배포
github.com/serverless-nextjs/serverless-next.js
serverless-nextjs/serverless-next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components - serverless-nextjs/serverless-next.js
github.com