Netlify dev

When you run netlify dev, we’ll start a local development server with access to redirects, Forms, Netlify Functions, Netlify Edge Functions, and more.

Netlify dev --live

By default, this server runs on a local address like http://localhost:8888 2, which means it’s only accessible within your machine. But sometimes you might want to share your work with other people, which would require a publicly accessible URL. And that’s exactly what happens when you run the command with the --live flag! We’ll generate a .netlify.live URL that you can share with anyone to view your site, in real-time, as you develop it.

Screenshot of Netlify CLI running the dev command with the --live flag Screenshot of Netlify CLI running the dev command with the --live flag1225√ó952 62.3 KB

This is also incredibly useful if you’re developing a function that responds to a webhook from an external service, as you can point it at your live URL and iterate quickly, with a very short feedback loop. Fixed URLs Until recently, the live URLs used a random subdomain that changed every time you started the CLI. This made it difficult to use them in automated workflows, and forced you to reconfigure any external services with the updated URL whenever you started over. That is no longer the case. When you generate a live URL for the first time, the Netlify CLI will remember it and reuse it every time you start a session on your computer. Custom URLs If you want something nicer than a random sequence of letters and numbers, you can pass your own custom subdomain to the --live flag. For example, running netlify dev --live=jane will generate a URL like https://jane--YOUR-SITE-NAME.netlify.live, giving you an identifiable and easy to memorize URL that you can share with anyone.