Cod*_*erX 0 azure node.js sequelize.js tedious
将我的应用程序部署到 AZURE 时,我收到以下警告。
(节点:6568)[DEP0064] 弃用警告:不推荐使用 tls.createSecurePair()。请改用 tls.Socket。
但这不允许我的应用程序启动。Azure 日志显示以下内容:
日志路径:D:\home\LogFiles\Application>
我知道这个问题已经有 8 个月了,但为了完整起见,我将提供有关如何在 Azure 中抑制 Node 警告的答案。其实有多种方式:
只需在 iisnode.yml 中添加以下行:
nodeProcessCommandLine: node.exe --no-deprecation --no-warnings
Run Code Online (Sandbox Code Playgroud)
或者,如果您使用 Node 版本的完整路径,则需要引用它,例如
nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\10.6.0\node.exe" --no-deprecation --no-warnings
Run Code Online (Sandbox Code Playgroud)
在文件末尾,您会看到一个注释掉的标签。用这样的东西替换它:
<iisnode nodeProcessCommandLine="node.exe --no-deprecation --no-warnings"/>
Run Code Online (Sandbox Code Playgroud)
iisnode.yml 优先于 web.config
在此处查看有关如何在 Azure 中添加运行时标志的原始帖子:将标志传递到 Azure Web 应用程序中的 NodeJS 的 Chrome V8 引擎