loading...

re: Server-Side Rendered Real-time Web App with Next.js, AWS Amplify & GraphQL VIEW POST

FULL DISCUSSION
 

How to deploy Nextjs frontend (SSR) in amplify console?

 

You will need to do :

next build && next export

This will generate a static version of your app in the out directory

Then point Amplify Console to the out directory by setting artifacts -> baseDirectory in your amplify config : docs.aws.amazon.com/amplify/latest...

 

Thank you. Can I deploy Nextjs API with this?

No, unfortunately you can't deploy the API directory like this, this is only for your static assets and for the api calls you will need a node server. You can use zeit's now to easily deploy the API, alternatively you can use any provider that supports node apps deployment and then running npm run build && npm run start.

Why is the title of this article "Server-Side Rendered Real-time Web App with Next.js, AWS Amplify" if Amplify doesn't support SSR? 🤔

Amplify Console doesn't support SSR but you can use the Amplify API to populate the data for your page on the server side

 

I did same but still access denied error page on my production branch url - master.d1pgdow2brm58j.amplifyapp.com/

Code of Conduct Report abuse