当我使用“电气化”和“电气化包”时,蒙戈和节点都是从某个地方获取的,并被打包到电气化应用程序中。它们是从哪里来的?这些是流星的芒果和节点吗?还是安装在系统上的那些?上述两个命令是否使用相同的mongo和节点?
发布于 2016-08-13 17:38:03
**TL;DR:您的~/.meteor文件夹就是它的来源。
在GitHub电气化存储库中,我们可以看到MongoDB路径和守护进程位置在这个文件中被引用为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,减去尾随的“流星”,~/.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:等价于带有附加d的this.meteor.mongo (即mongo变为mongod),~/.meteor/packages/meteor-tool/1.3.5_1/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod。
https://stackoverflow.com/questions/38935122
复制相似问题