Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 with a path parameter. But, the npm start documentation contains no such feature.

I tried myself only to find npm start ./myapp does not work. Is there a way to do that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
992 views
Welcome To Ask or Share your Answers For Others

1 Answer

This one-liner should work:

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

Corresponding doc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...