Skip to content

Commit

Permalink
use opn for cross-os compatibility. fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
skratchdot committed Dec 11, 2017
1 parent 34d9719 commit 898f509
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"micro-css": "^0.5.0",
"observ": "^0.2.0",
"observ-struct": "^6.0.0",
"opn": "^5.1.0",
"stereo-panner-node": "~0.2.0",
"through2": "^0.6.5"
},
Expand Down
3 changes: 2 additions & 1 deletion run.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env node
var exec = require('child_process').exec
var opn = require('opn');

process.chdir(__dirname)
var runner = exec('npm start')

console.log('Starting server...')
setTimeout(function () {
console.log('Go to http://localhost:9966')
exec('open http://localhost:9966')
opn('http://localhost:9966')
runner.stdout.pipe(process.stdout)
runner.stderr.pipe(process.stderr)
}, 2000)

0 comments on commit 898f509

Please sign in to comment.