node.js - Npm "scripts": "start" run express and open url -


i have start params in package.json

"scripts": {     "start": "node bin/www"   }, 

it running espress app whan typing npm start.

but want browser opened http://localhost:8081 @ same time. how can start open local url well?

like: "start": "node bin/www, http://localhost:8081"

so when typing npm satrt runs express app , opens url @ same time.

as far know it's writing bash command:

// windows "start":"start http://localhost:8081 & node bin/www"  // mac "start":"open http://localhost:8081 && node bin/www"  // linux "start":"xdg-open http://localhost:8081 && node bin/www" 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -