How can I get npm start at a different directory?

后端 未结 6 1102
野的像风
野的像风 2020-12-07 08:11

I usually cd into the app directory and then run npm start.

It is my feeling that there ought to be some way to run npm start

6条回答
  •  误落风尘
    2020-12-07 08:18

    npm start --prefix path/to/your/app

    & inside package.json add the following script

    "scripts": {
       "preinstall":"cd $(pwd)"
    }
    

提交回复
热议问题