When you want to show your app to someone but don’t want or can’t deploy it. If only they could see your browser in dev mode to help fix that error showing in the console or see your new design and ok it. — Debbie O'Brien
Introducing nuxt/n-grok. ngrok exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.
@nuxtjs/ngrokdependency using yarn or npm to your project
yarn add @nuxtjs/ngrok
@nuxtjs/ngrok to the buildModules section of your
3. Run your app
npm or yarn run dev you should now see a link to your Public URL
When running Nuxt in dev mode you will now see a Public Url in the Nuxt CLI that you can copy and share with anyone. They will then be able to see your localhost and watch your live changes while working in dev mode.
Note that, out the box, there are no security options passed. Your dev server is exposed to the world without protection. To set up password protection, follow the guide below.
Set up password protection
When you don’t have password protection set up, you are going to run into this warning.
To clear the above warning, you can set up a username and password by using the option
ngrokauth and passing in a username and password separated by a colon
username:password. To keep the user and password values a secret you should add them to your
.env file with the key
Run your app
npm or yarn run dev you should now see the prompt below.
for more options, check out the well-written documentations.