Automatically opening the browser when running npm will only work on your local computer. People will access the application by going to the URL of the server it is hosted on.
You can open tabs using window.open
.
If you want to open tabs automatically on page load you can wrap it in a useEffect call and put this in a suitable place depending on how your application is set up. It would look something like this:
[tabsOpened, setTabsOpened] = useState(false)
useEffect(() => {
if (!window || tabsOpened) return null;
window.open("http://example.com", "_blank");
window.open("http://example1.com", "_blank");
window.open("http://example2.com", "_blank");
// etc...
setTabsOpened(true)
}, [window])
Note that some browsers/plugins may block you from opening multiple tabs. I just did a test and it seems to work in Safari but not Chrome.
If you want to specify on which monitor each window opens things get a bit more complicated. But this question seems to be a good starting point:
window.open() on a multi-monitor/dual-monitor system - where does window pop up?