AnswerBun.com

Next.js deploy via Serverless Framework, How does it work and can be up-to-date?

Stack Overflow Asked by Ji-in Kim on December 22, 2020

I’ve deployed my Next.js portfolio website using Serverless Framework. Some magical things happened after I typed ‘npx Serverless’, though I don’t fully understand how it worked.

Two questions here…

First, I’m not sure I got this right. Does Serverless framework export all the static pages generated by ‘next build & export’ to S3 and routes pages using Lambda, unlike deploying Next.js application itself to AWS EC2 instance? So the purpose of those Lambda functions is to substitute Next.js functionalities such as Dynamic Route?

Also, I don’t get the meaning of ‘[email protected] SSR Renderer’ here. I know Cloudfront and [email protected] allows to connect nearby location but why it’s called ‘SSR Renderer’? Doesn’t static pages Next.js exported already contain content required that was fetched by ‘getStaticProps’ so what browser does is simply requesting Html,CSS,JavaScript files from S3?

Second, how do I re-deploy my application when there’s any changes have made? Can I just type ‘npx serverless’ again to overwrite static in S3?

Add your own answers!

Related Questions

trying to reverse the string with “_” fixed at point

3  Asked on December 31, 2020 by saurabh

   

PHP JsonEncode For MultiDimensional Array

3  Asked on December 31, 2020 by kalui

 

How to call function from other files like headers in C?

2  Asked on December 31, 2020 by oussama-lahouar

     

Flutter: Exception using Navigator.of(context).pop();

2  Asked on December 31, 2020 by gianni-ottimista

       

Admob reward ads don’t work on ios on Expo App

1  Asked on December 31, 2020 by mikayel-saghyan

       

ASCII Code of Latin Small Letter i with Macron and Dot

0  Asked on December 31, 2020 by isari

   

Object comparison Complexity Javascript

1  Asked on December 31, 2020 by ron-bellaiche

       

Can’t fetch data from API using Vue and Axios

2  Asked on December 31, 2020 by via

       

StandardScaler returns NaN

1  Asked on December 31, 2020 by skywalkerytx

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP