Over a million developers have joined DZone.

Opening URLs in Node.js with the openurl Module

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:
  • http URLs: open the default browser
  • mailto URLs: open the default email client
  • file URLs: open a window showing the directory (on OS X)
Example interaction on the Node.js REPL:
    > require("openurl").open("http://rauschma.de")
    > require("openurl").open("mailto:john@example.com")
Install via npm:
    npm install openurl
I’m not yet terribly familiar with implementing npm packages, so any feedback is welcome (especially experience reports on Windows and Linux, which I can’t test on).

 

From http://www.2ality.com/2012/02/openurl.html

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}