<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/run-with-node-env/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 18:27:53 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/run-with-node-env/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>如何统一「NODE_ENV」环境变量在不同操作系统下的设置方式？</title><link>https://magiclen.org/cn/run-with-node-env/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/11/soil-5342049_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/11/soil-5342049_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/11/soil-5342049_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/11/soil-5342049_1920-660x486.jpg 3x" alt>
「NODE_ENV」是使用 Node.js 常去设置的环境变量，不过它其实并不是 Node.js 本身会去使用到的环境变量，而是这个生态系约定俗成的用法。在 Linux、macOS 等 Unix-like 的操作系统环境下，要设置程序的环境变量的值，只要在运行指令的前面加上「变量=值」并用空格隔开即可，但在如 Windows 等其它操作系统，指令就不支持这样的语法。]]></description><category>JavaScript</category><category>JavaScript</category><category>node.js</category><category>run-with-node-env</category><guid>https://magiclen.org/cn/run-with-node-env</guid><pubDate>Thu, 17 Nov 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>