question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to open virtual host name instead of localhost:3000

See original GitHub issue

I really wanna use browser-sync in my workflow but the only problem is I’m using Nginx virtual host domains on my local for serving my angular website which in turns uses the backend rest apis made in laravel which sets the cors thing and I have made whitelist entry of my site (http://mj.dev) in the backend for it. Now, using browser Sync with gulp only opens the site with localhost:3000 which is unacceptable for my situation. I tried using

gulp.task('browser-sync', function() {
    browserSync.init({        
        proxy: 'mj.dev'        
    })
})

but didn’t work out. Can someone help me with this.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shakyShanecommented, Dec 22, 2015

@paramsinghvc

gulp.task('browser-sync', function() {
    browserSync.init();
});

^ this will give you a snippet in the terminal that you can paste into your website

0reactions
paramsinghvccommented, Dec 22, 2015

@shakyShane Please a little more explanation or a code sample.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I develop locally using a domain name instead of ...
Step 3: (Depending on whether you're running a backend) you may need to add somedomain.com as an allowed domain.
Read more >
Cannot Access Virtual Host Via Apache On Localhost
While trying to retrieve the URL: http://projects/users.xml The following error was encountered: Unable to determine IP address from host name for projects The ......
Read more >
How to change localhost to custom domain name - YouTube
Learn how to change localhost to a desired custom domain name so that you can access your web ... Your browser can't play...
Read more >
How to set a custom domain name on a localhost (Windows 10)
For example, let's say, your website is located at C:xampp/htdocs/folder/example/. Instead of typing the full url, you could route your custom ...
Read more >
Cannot use localhost to access a react-app running in WSL2
Steps to reproduce the problem: Execute npm start to launch a react app in WSL2. Open http://localhost:3000 in a browser in Windows.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found