当我使用“通电”和“通电包”时,从某处获取mongo和节点并将其打包到电气化的应用程序中。他们来自哪里?这些是来自流星的mongo和节点吗?或者安装在系统上的?上述命令是否都使用相同的mongo和节点?
答案 0 :(得分:1)
** TL; DR:您的~/.meteor
文件夹来自其中。
正在搜索GitHub Electrify repository,我们可以看到MongoDB
路径和守护程序位置在this file中被引用为this.meteor.mongo
和this.meteor.mongod
:
this.meteor.mongo = join(this.meteor.dev_bundle, 'mongodb', 'bin', 'mongo');
this.meteor.mongod = join(this.meteor.dev_bundle, 'mongodb', 'bin', 'mongod');
通过这些变量展开:
// https://github.com/arboleya/electrify/blob/94bb01d72d1cc0cc041836514de628d2c9009c23/lib/env.js#L114
this.meteor.dev_bundle = join(this.meteor.tools, 'dev_bundle');
// https://github.com/arboleya/electrify/blob/94bb01d72d1cc0cc041836514de628d2c9009c23/lib/env.js#L113
this.meteor.tools = this.meteor.root.replace(/meteor(\.bat)?$/m, '');
// https://github.com/arboleya/electrify/blob/94bb01d72d1cc0cc041836514de628d2c9009c23/lib/env.js#L112
this.meteor.root = join(meteor_dir, meteor_symlink);
// https://github.com/arboleya/electrify/blob/94bb01d72d1cc0cc041836514de628d2c9009c23/lib/env.js#L109
meteor_symlink = fs.readlinkSync(join(meteor_dir, 'meteor'));
// https://github.com/arboleya/electrify/blob/94bb01d72d1cc0cc041836514de628d2c9009c23/lib/env.js#L108
meteor_dir = join(this.os.home, '.meteor');
因此,我们可以看到,对于Linux,它将是:
meteor_dir
:主路径(~
),然后是子文件夹.meteor
,
~/.meteor
; meteor_symlink
:遵循meteor
的符号链接,
./packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/meteor
; meteor_root
:以上的组合(例如~/.meteor/<symlink>
),
~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/meteor
; meteor_tools
:meteor_root
,减去尾随&#34;流星&#34;,
~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/
; meteor_dev_bundle
:meteor_tools
然后是子文件夹dev_bundle
,
~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/dev_bundle
; this.meteor.mongo
:meteor_dev_bundle
然后是子文件夹mongo
,然后是子文件夹bin
,然后是子文件夹mongo
~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongo
; this.meteor.mongod
:相当于this.meteor.mongo
并附加d
(即mongo
变为mongod
),
~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod
。