Next.js commands that you should be aware

Next.js commands that you should be aware

ยท

2 min read

Next.js is very popular react based framework. It is very fast in terms of processing.

Before starting to Next.js you have to be familiar with some basic commands thats going to be useful in your every day life.

Here, are some important Next.js commands that you should be aware, if you are working on Next.js

๐Ÿ“Œ List all Next.js commands.

npx next -h

-> This will lists all the commands available in Next.js

Eti5eivVgAATIwd.jpg

๐Ÿ“Œ Move your Next.js application on production.

next build

-> This will create a optimized version of your production build. It optimize each page.

-> First Load JS colored with green, yellow and red. Green color indicate that the application having good performance. Red indicated the worst optimization.

Eti3XcvUUAM5he1.png

๐Ÿ“Œ Check the version of Next.js installed on your machine.

npx next -v

-> This will show the Next.js version.

Eti5GiEVgAY5ON8.jpg

๐Ÿ“Œ What if you want to change the default port ?

```npx next dev -p 6000

-> By default Next.js application runs over port 3000. But if you want to change the port number then you can do it by specifying -p option.

Thanks for reading this article. If you like this, then you can follow me and don't miss the upcoming web development and programming tips and articles like these.

You can find me on twitter.

Twitter: @iamharis010