1

I'd like to use MongoDB with Geddy. I've edited my "production.js" file but it seems not working... I don't remember my MondoDB username and password...

I get this error : Error: 500 Internal Server Error

production.js :

  var config = {
    detailedErrors: false
  , hostname: null
  , port: 4000
  , model: {
      defaultAdapter: 'mongo'
    }
  , db: {
      mongo: {
        username: 'root'
      , dbname: 'anthonycluse'
      , prefix: null
      , password: 'root'
      , host: 'localhost'
      , port: 27017
      }
    }

  };

  module.exports = config;

UPDATE

Command :

geddy gen secret

config.js :

var config = {
  detailedErrors: true
, debug: true
, hostname: null
, port: 4000
, model: {
    defaultAdapter: 'mongo'
  }
, db: {
    mongo: {
    dbname: 'anthonycluse'
    , host: 'localhost'
    , port: 27017
    }
  }
tonymx227
  • 5,293
  • 16
  • 48
  • 91

1 Answers1

1

A few things could be going wrong here.

Try turning on detailed errors detailedErrors: true so that you can see what's going wrong in the console.

Also, it seems unlikely that your password and username would both be "root" in production. Are you running Geddy in development? In that case, you should be editing development.js.

You can see in the console output what mode (development or production) you have started geddy in.

Ben
  • 1,292
  • 9
  • 17