相关疑难解决方法(0)

.env 使用 vscode 和 dotenv npm 调试断点

我正在使用 nodejs 服务器端 api,使用dotenv npm 包设置环境变量,并从package.json 中的npm 脚本运行代码,如下所示:

"scripts": {
   "local": "cross-env NODE_ENV=local nodemon ./bin/www"
}
Run Code Online (Sandbox Code Playgroud)

我需要的是配置我的 .vscode/launch.json 文件。

目前它看起来像:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": []
}
Run Code Online (Sandbox Code Playgroud)

请指导我。谢谢,Gopal.R

debugging node.js npm visual-studio-code dotenv

6
推荐指数
1
解决办法
2650
查看次数

标签 统计

debugging ×1

dotenv ×1

node.js ×1

npm ×1

visual-studio-code ×1