topiary-io / topiary

a modern content management system
Other
2 stars 0 forks source link

Open browser to admin automatically when `topiary` is run #5

Open doesntgolf opened 8 years ago

doesntgolf commented 8 years ago

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 using xdg-open. I think OSX uses just open. 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.

schtauffen commented 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.

doesntgolf commented 8 years ago

@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.