How to open browser to localhost through npm scripts
This can be achieved by including a couple of additional packages in your project. Additional packages Install http-server: $ npm install http-server –save-dev and concurrently: $ npm install concurrently –save-dev npm scripts Add the following open script to package.json: “scripts”: { “start”: “npm run open”, “open”: “concurrently \”http-server -a localhost -p 1234\” \”open http://localhost:1234/build\”” } … Read more