【文件属性】:
文件名称:node-bash.env:Node.js的bash.env配置
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-24 17:08:23
JavaScript
假设您的暴发户脚本是这样的
description "Simple upstart Script from my Node project"
start on started networking
stop on runlevel [016]
respawn
env MAIL_FROM='noreply@mail.com'
export MAIL_FROM
pre-start script
. /apps/myproject/.env
end script
script
exec /usr/bin/node /apps/simple.js
end script
上面的新贵部分正在/apps/myproject/.env文件。 这种技术使我们能够加载将在您的应用程序中使用的环境变量。
upstart / bash脚本中使用了应用程序中的同一.env文件。
/apps/mypro
【文件预览】:
node-bash.env-master
----.gitignore(22B)
----README.md(2KB)
----test()
--------.flag.env(15B)
--------.reuse.variable.env(41B)
--------.env(91B)
--------.sugar.env(17B)
--------.no.override.env(19B)
--------index.js(3KB)
--------.override.env(18B)
--------.no.export.env(82B)
--------.comments.env(33B)
--------.custom.env(59B)
----package.json(422B)
----index.js(1KB)
----.travis.yml(78B)