Npm “scripts”: “start” run express and open url

前端 未结 3 1487
感动是毒
感动是毒 2021-02-01 15:51

I have this start params in package.json

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

It is running my express app when I a

3条回答
  •  长情又很酷
    2021-02-01 16:08

    For cross-platform support use open-cli.

    Install it:

    npm install --save-dev open-cli
    

    Add it to your scripts:

    "start": "open-cli http://localhost:8081 && node bin/www"
    

提交回复
热议问题