1.0.2 • Published 3 years ago
@ruienger/browse v1.0.2
browse
open the default browse using the url & port you provided
Usage
import { browse, browseLocally, setBrowseCmd, getLocalhostIP } from 'browse'
attention: platform supported: linux/macos/windows
// browse url using default browser
browse(''https://github.com/ruienger'');
// browse localhost:port using default browser
browseLocally(port)
// set the command that support your platform
setBrowseCmd(myCommandToOpenApplications)
// get the ip of localhost, return ''localhost'' if failed
getLocalhostIP() => 127.0.0.1