Open doesntgolf opened 8 years ago
Additionally, we need to determine what this behavior will be if they run topiary on a remote server. It should know not to attempt to open a browser there, as we could create unused browser instances.
@Schtauffen ha! Excellent point.
My first thought is to tie it into admin auth. If auth is turned off, it should mean that the user is running Topiary locally. I'd say let's just leave this for later.
Non-technical users won't know how to find the admin after they start Topiary. We need to open the default browser to the admin when everything starts without errors. (We should also eventually start even when there are errors, and explain the errors in the browser, since stdout errors won't be meaningful to most people.) On Debian/Ubuntu distros this is as simple as running
sensible-browser localhost:3000/admin
. A more cross-Linux alternative would be usingxdg-open
. I think OSX uses justopen
. No clue how to do it in Windows. If there isn't a simple way to cover all cases, we can use the open-golang module.