# Made a app to start browser sync , anyone interested?

**URL:** https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759
**Category:** General
**Created:** [December 10, 2020, 8:55am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759 "2020-12-10T08:55:44Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 10, 2020, 8:55am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/1 "2020-12-10T08:55:44Z")

</div>

Hi there,  
I loved the new update with the option to use browser sync but i found it a bit awkward to have to open the cmd each time and paste the line in to run the start the browser sync.

So i made a small c# .net core app for those of us using windows so we don’t need to paste anything just click the app and the browser sync will start automatically.

A even better option is if the app is placed in the pinegrow folder and maybe the pinegrow team add a link in pinegrow menu under user browser sync to trigger my app to start the browser sync.  
It would be nice to be able to do everything from pinegrow without having to click my app but i guess placing my app in the start menu will also work better then having to open cmd and paste the line to run browser sync.

If anyone are interested ill finish up the app and share it or if the pinegrow team want to use it ill give it to them.

---

<div class="post-metadata">

### Author: ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)
#### Post date: [December 12, 2020, 2:55pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/2 "2020-12-12T14:55:46Z")

</div>

Pretty neat @beatngu - I’m guessing that with your app the default hostname/port, or…?

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 12, 2020, 7:11pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/3 "2020-12-12T19:11:24Z")

</div>

I added a small settings file so the user can get their port from pinegrow and just copy paste it to the settings file since it may vary from user to user what ports they use.

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 12, 2020, 7:34pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/4 "2020-12-12T19:34:13Z")

</div>

Here is the download link if anyone want to use it : [https://www.dropbox.com/s/1zmlu6azh56goeo/StartBrowserSync.zip?dl=0](https://www.dropbox.com/s/1zmlu6azh56goeo/StartBrowserSync.zip?dl=0)

1.Download the file and unpack it anywhere on your pc.  
2.Open pinegrow and click --\> Support --\> Show API url  
3.Copy the url marked in red  
4.Go to the folder of StartBrowserSync  
5.Open the text file called api\_url.txt and replace the url with the one you copied from pinegrow and save.  
6.Click the icon of StartBrowserSync and you should be ready to use browser sync.

You may have to download .net core 3.1 if you don’t have it installed on your pc here is the link : [Download .NET Core 3.1 (Linux, macOS, and Windows) (microsoft.com)](https://dotnet.microsoft.com/download/dotnet-core/3.1)

---

<div class="post-metadata">

### Author: ![davidxtaylor](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidxtaylor](https://forum.pinegrow.com/u/davidxtaylor)
#### Post date: [December 17, 2020, 10:08am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/5 "2020-12-17T10:08:38Z")

</div>

This looks good, I too dislike fiddling around to start browser sync. But after installing this, plus the 3.1 .net update, reconfiguring the txt file as instructed (and restarting windows), I get **localhost** refused to connect. if I use the app and then from Pinegrow ‘Open the file browser’. However browser opens OK if browser sync is turned off. Any ideas what I need to do?

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 17, 2020, 12:04pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/6 "2020-12-17T12:04:44Z")

</div>

Not sure what’s going on , what happens if you do everything manual as described in the pinegrow documentation do you get a error then as well?

---

<div class="post-metadata">

### Author: ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)
#### Post date: [December 17, 2020, 1:20pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/7 "2020-12-17T13:20:49Z")

</div>

@beatngu No love for me either. Mind sending me the project?

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 17, 2020, 3:41pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/8 "2020-12-17T15:41:33Z")

</div>

What error do you get?  
Is it the command window?  
Nothing wrong with the code so it must be something missing on the pc.  
I am using it myself and i have debugged it just to make sure everything is working and it’s working fine.Tested on latest version of windows 10 x64 with net core 3.1 x64.

---

<div class="post-metadata">

### Author: ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)
#### Post date: [December 17, 2020, 3:52pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/9 "2020-12-17T15:52:05Z")

</div>

It is refusing the connection - error in the browser, no place else. Works fine if I start using browser-sync using the CLI.

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 17, 2020, 4:10pm UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/10 "2020-12-17T16:10:35Z")

</div>

That’s weird.  
I use edge as default browser.  
I just cleaned the solution and rebuilt it , you can check if this works for you.  
Or else if you have the dev tools i can send the solution but not much to debug since it’s just sending the string to cmd.

Here is the link to the rebuilt version [https://www.dropbox.com/s/6k86ryh6s8abth9/netcoreapp3.1.zip?dl=0](https://www.dropbox.com/s/6k86ryh6s8abth9/netcoreapp3.1.zip?dl=0)

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 18, 2020, 8:31am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/11 "2020-12-18T08:31:33Z")

</div>

Did some testing again yesterday and installed this on a fresh surface pro and installed pinegrow to test.  
This laptop has not visual studio and all the microsoft dev tools installed and it worked perfect.

One thing i must mention is , you want the latest net core SDK 3.1.404 and not just the runtime.  
So on the download page do not just install the runtime on the right side but install the latest stable release of the SDK 3.1.404.

There may be something iffy with the latest runtime and most of the time i don’t use the latest because of bugs and stuff like that but i thought with a small app like this it would not mather.

If this does not solves you problems i will convert it down to normal netframework 4.6 and that is very stable and i use that often in other apps i make.

PS: I would also like to mention in the pinegrow documentation of the browser sync it may be easier for people to use this link [https://nodejs.org/en/download/](https://nodejs.org/en/download/) instead of the link provided in the documentation that is going to the folder [https://nodejs.org/download/](https://nodejs.org/download/) to install nodejs. It may be a bit confusing and i think its easier to just use the installers.

---

<div class="post-metadata">

### Author: ![davidxtaylor](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidxtaylor](https://forum.pinegrow.com/u/davidxtaylor)
#### Post date: [December 18, 2020, 10:53am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/12 "2020-12-18T10:53:45Z")

</div>

Works as expected if I open node.js from command prompt and enter

browser-sync start --proxy “[http://127.0.0.1:40000](http://127.0.0.1:40000)”

But if I close that and run the app, again get ‘localhost refused to connect’.

---

<div class="post-metadata">

### Author: ![davidxtaylor](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidxtaylor](https://forum.pinegrow.com/u/davidxtaylor)
#### Post date: [December 19, 2020, 10:41am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/13 "2020-12-19T10:41:37Z")

</div>

The rebuilt version works for me, though it leaves the command window open which the first version did not.

That apart, most useful, many thanks.

---

<div class="post-metadata">

### Author: ![beatngu](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@beatngu](https://forum.pinegrow.com/u/beatngu)
#### Post date: [December 22, 2020, 10:38am UTC](https://forum.pinegrow.com/t/made-a-app-to-start-browser-sync-anyone-interested/4759/14 "2020-12-22T10:38:53Z")

</div>

Awesome that it works for you , but weird that the first one does not work since i did not change the code on the second one.

The window is supposed to stay open , i find it easy to use to see what’s running on my pc.  
However i do understand some want to have the window disabled since it saves one click so i will make a second version with hidden command window that only runs in the background.
