Next.js Discord

Discord Forum

Correct way to "simulate" production

Answered
Eurasian Blackbird posted this in #help-forum
Open in Discord
Eurasian BlackbirdOP
Hello !

I am trying to understand more deeply the different rendering method, but using the command "npm run dev" just make it harder to understand what will really happen once my app will be in production, because of many reasons, including hot reload.

So I wanted to test how will my pages react once they will be in production and I was wondering if doing "npm run build" then "npm run start" (next build, next start) will give me the same server as one the one that will be on production after deployment ?

Thank you 😄
Answered by Arinji
yes, npm run build builds your app for production
View full answer

4 Replies

yes, npm run build builds your app for production
Answer
and npm run start runs the production code
Eurasian BlackbirdOP
Okay, thank you very much
no worries, mark an answer if it has solved your question