Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

mongodb - Meteor without mongo

With 0.6.5 release it is possible to develop non web apps with meteor. I rebuild it from scratch for ARM processor but I don't want DB support at all. (Mongo is a processor killer, has to high footprint and I simply don't need it)

ARM should work as DDP client only, with this in mind I build it manually without mongo.

And tried to build simplest app possible only 1 package at start (all standard packages removed)

meteor

and one file in server folder

main = function(argv){
  return "DAEMON"
}

Meteor.setInterval(function(){
  console.log("HellOnWorld");
},1000);

On machine with full meteor install it works as expected but without mongo installed I got errors

Unexpected mongo exit code 127. Restarting.
Unexpected mongo exit code 127. Restarting.
Initializing mongo database... this may take a moment.
Unexpected mongo exit code 127. Restarting.
Can't start mongod

Obviously I don't have and want mongo.

Is there any way to start meteor without waiting for mongo db ?

Meteor team plans to support other db's so it must be implemented sooner or later.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

UPDATE

For newer versions of Meteor you need to remove the mongo package. The mongo package is embedded in the meteor-platform package. So you need to remove that and add all the rest back (from https://github.com/meteor/meteor/tree/devel/packages/meteor-platform):

meteor remove meteor-platform
meteor add  meteor webapp logging tracker session ddp blaze spacebars templating check underscore jquery random ejson templating check underscore jquery random ejson

Then your app won't use Mongo anymore :).

In dev mode you can get rid of mongo by setting the MONGO_URL environment variable to something else and start meteor. For example: MONGO_URL=mongodb://nowhere meteor


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...