1

Looking to try out Deployd with MongoDB and an AngularJS front end. On my Mac I can get Node and Mongo to launch, but it requires launching mongod with the --config flag. I created a .conf file and launch it with the flag, each time directing it to the location of the .conf file. Deployd is attempting to launch mongodb but gets the same error I got initially trying to start mongod, which is that it can't read the config file.

I'm new to mongo and am having a rough time getting this to play nice. Am I missing something? I even installed it using Homebrew, which was supposed to go ahead and take care of these config issues, but I'm still not getting where I need to be.

Any clarification at this point would be helpful. I'm guessing that there's some simple thing that I've messed up along the way.

  • I don't know much about Deployd, but normally only a single instance of the mongod server would be running on your system. What happens if you start mongod before starting Deployd? – nachbar Sep 06 '13 at 18:43
  • Solved my own problem. Looking at the information that homebrew was looking for I took a look at where the plist file thought it was supposed to be. It looks for the appropriate config file in usr/local/etc. Problem was that the etc directory was actually an empty file, so nothing could be written there. Got rid of the file and created a directory. Reinstalled mongo and miraculously everything worked as advertised. Would have been great if I had known to look for this a day and a half ago. – user2755115 Sep 06 '13 at 19:02

1 Answers1

0

I had a similar problem and finally found out how it works.

if you want to use the mongodb dataset which was created by #deployd (you find it in the data folder) tell mongod the path of the folder and the port you want to listen on.

This is how you can start the mongodb server with the deployd dataset

mongod --dbpath ./data/ --port 12345

Next create a node.js script to start deployd which will listen to your mongodb.

var deployd = require('deployd');

var dpd = deployd({
  port: 2403,
  env: 'development',
  db: {
    host: '127.0.0.1',
    port: 12345,
    name: '-deployd'
  }
});

dpd.listen();

This script with mongodb will create the exact situation than using the command dpd. However now you can use all other nodejs function.

Jürgen Brandstetter
  • 7,066
  • 3
  • 35
  • 30