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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -