how to run nextjs in another port

JavaScript
yarn dev -p 3005
Source

Also in JavaScript: