福尔摩斯对我笑 2019-01-16 47836 次 11206条




set NODE_ENV=production
#环境变量追加值 set 变量名=%变量名%;变量内容
set path=%path%;C:web;C:Tools

永久配置右键(此电脑) -> 属性(R) -> 高级系统设置 -> 环境变量(N)...


if( process.env.NODE_ENV == "production"){



npm install --save-dev cross-env


index.js 是我的启动文件,development可随你修改

"development": "cross-env NODE_ENV=development node index.js",
"production": "cross-env NODE_ENV=production node index.js"

npm run production 生产环境
npm run development 开发环境

标签: 无


未来博客 博主大人



已有 11206 条评论 1

  1. supreme hoodie

    I want to convey my admiration for your generosity for those individuals that must have guidance on this subject. Your special dedication to passing the solution along came to be extremely beneficial and has really empowered professionals just like me to attain their ambitions. Your entire important publication can mean a great deal to me and much more to my colleagues. Best wishes; from each one of us.

    回复 2019年10月12日
  2. fila disruptor

    I needed to post you one little bit of remark just to say thank you as before just for the amazing views you’ve shared on this page. It was really unbelievably open-handed of you to offer publicly exactly what a number of people would have offered for an ebook in order to make some cash for their own end, particularly considering the fact that you could have done it if you ever decided. These ideas in addition worked as a great way to know that some people have the identical dreams just like my personal own to learn good deal more in regard to this issue. I’m certain there are numerous more pleasurable occasions ahead for individuals who looked over your blog.

    回复 2019年10月11日
  3. nike air max

    I am glad for writing to let you understand what a fabulous experience my friend’s girl gained checking your web site. She picked up numerous issues, which included what it is like to have a marvelous teaching mindset to make many others easily know precisely a number of complex things. You undoubtedly did more than her desires. Many thanks for giving these effective, dependable, educational and also cool tips on your topic to Gloria.

    回复 2019年10月10日
  4. harden shoes

    Thank you for each of your hard work on this blog. My mum delights in carrying out investigations and it’s really obvious why. All of us learn all about the dynamic form you offer useful techniques on the web site and in addition attract participation from the others on this article so our child is undoubtedly learning so much. Take advantage of the remaining portion of the new year. You have been conducting a superb job.

    回复 2019年10月9日
  5. nike air max

    I wish to show my appreciation for your kind-heartedness supporting men and women who have the need for assistance with the issue. Your real commitment to passing the message all-around had become extraordinarily beneficial and have always enabled girls like me to arrive at their objectives. The valuable guide means a great deal to me and even more to my office colleagues. Best wishes; from everyone of us.

    回复 2019年10月9日
  6. cheap jordans

    I intended to compose you the very little note so as to thank you so much yet again relating to the extraordinary guidelines you’ve shared above. This has been tremendously generous with you to make openly all many of us might have marketed for an e book in making some dough for themselves, especially now that you might have tried it in the event you considered necessary. The tricks likewise served to be a great way to comprehend other individuals have similar interest just as my very own to see a whole lot more when it comes to this problem. I am certain there are numerous more enjoyable opportunities up front for individuals who looked over your blog post.

    回复 2019年10月8日