It's the same as any external browser opening plugin, just set the url to the local url.
For example, here's a function that does it for you.
Code:
function openLocal(file) {
var path = require('path');
var base = path.dirname(process.mainModule.filename);
var url = path.join(base, file);
var cmd;
if (process.platform === 'darwin') cmd = 'open';
if (process.platform === 'win32') cmd = 'explorer.exe';
if (process.platform === 'linux') cmd = 'xdg-open';
var spawn = require('child_process').spawn;
spawn(cmd, [url]);
}
So if you do:
openLocal('test.html');
it'll open the test.html file thats in the root of your project (the folder with the index.html)
you can also do directories like:
openLocal('somedir/test.html');
If you just want to use an existing browser opening plugin, then again the only part you need would get to get the correct path, so you just need:
Code:
var path = require('path');
var base = path.dirname(process.mainModule.filename);
var url = path.join(base, FILEPATH_TO_OPEN);
Also all this only works when playing from desktop.