JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

[Node.js] Hanlde process.env with dotenv

发布时间 2023-04-26 15:41:41作者: Zhentiw
import * as dotenv from "dotenv";

const result = dotenv.config();

if (result.error) {
  console.log('Error loading environment variables, aborting.')
  process.exit(1)
}

console.log(process.env.PORT)

 

    本栏目推荐文章
  • node版本管理工具推荐
  • A connection was successfully established with the server but then an error
  • mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; ERROR 1410 (42000): You are not allowed to create a user with GRANT
  • org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message
  • Dynamics 365 Finance & Operations with Power Automate
  • CDS Virtual Entities with Dynamics 365 Finance and Operations
  • [LeetCode] 2085. Count Common Words With One Occurrence
  • 【LeetCode 1635. Hopper 公司查询 I】with recursive生成2020年每月的最后一天
  • ubuntu20.04 opencv 4.2 + opencv_contrib 4.2.0 安装笔记 和 opencv 4.5.4 with cuda 安装笔记
  • how to work with FlatBuffers
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们