Opening URLs in Node.js with the openurl Module
Join the DZone community and get the full member experience.
Join For Free
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)
> require("openurl").open("http://rauschma.de") > require("openurl").open("mailto:john@example.com")Install via npm:
npm install openurlI’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).
Node.js
Opinions expressed by DZone contributors are their own.
Comments