Node cannot get environment variables

clipboard.png
has set the environment variable in / etc/profile, which can be printed directly on the command line, but it is not available in the node program with "console.log (process.env.NODE_COUNTRY)". Currently, it is also logged in by root users. what may be the reason for this?


has been resolved. The problem is that the Linux server needs to be restarted before node can obtain the environment variables


execute the following two sentences to see if the output is normal?

 export NODE_COUNTRY=1234
 node -e 'console.log(process.env.NODE_COUNTRY)'
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc84-44e74.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc84-44e74.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?