yarn construction project want to run node app.js we supposed to do?

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/sinat_36146776/article/details/90754137
//package.json
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "app": "./server/app.js"
  },
  直接这样是不行的,因为没有yarn app.js这种执行语句,需要改为:
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "app": "node ./server/app.js" 
  },

In the statement before execution plus the normal node can perform
the equivalent of

node app.js

Guess you like

Origin blog.csdn.net/sinat_36146776/article/details/90754137