What’s the name of the file? The base file in any web page should be
index.html, because that’s what the server expects it to be (unless it knows otherwise). This is not unique to Browsersync; it’s been a convention of web development probably since HTML started to be a thing.
There is no ip address in the tab (as opposed to the video), it says localhost:3000 instead in the address bar
localhost is the domain name for your local computer. It’s synonymous with the IP address
127.0.0.1. The port is
3000, which is an arbitrary high number that probably isn’t in use on any given machine and is easy enough for the user to remember.
only Cannot GET/ is displayed below.
A search turns up confirmation that the error happens when you don’t have an
index.html in the directory, which goes back to my previous point.
how is BS launched in a new session?
There are a bunch of different ways, but most of them are more complicated.
It always has to be launched from the windows terminal, setting the target folder?
Not always. If you want, you can drop the command into a
.bat file in the same directory and use that to run it from within Explorer.
There is global and local install of BS, as per its website local is the preferred way.
For your purposes, global is best. Local is important if you’re building a project that relies on certain features of Browsersync (features that might change in an update and would break your project). If you were building software to distribute to other people, you would need to define the Browsersync version within your project and have it local.
The above install is a global or local install? I assumed global, but a specific folder was set so I dont know.
You used the
-g switch, so it’s global. All global NPM packages should be in your
AppData/Roaming/npm directory. Since it’s global, you can activate it from anywhere.
Local packages are installed in the project folder under
node_modules/. The required dependencies and version numbers for projects built in the Node ecosystem are recorded in a file called
package.json, which you’ll see a lot of. None of that is relevant for you right now.
If I start a new project (with a new folder containing the html, css etc. files), how to run BS?
The exact same way.