Skip to content

Commit

Permalink
Use json instead of yaml for datastore config
Browse files Browse the repository at this point in the history
  • Loading branch information
gluxon committed Apr 6, 2015
1 parent 0fda108 commit 5024c9d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ var mongoose = require('mongoose') // Datastores
Grid.mongo = mongoose.mongo; // Connect GFS and MongoDB

var uuid = require('node-uuid'); // Miscellaneous utilities
var yaml = require('js-yaml');

// Grab settings
var datastore = yaml.load(fs.readFileSync(__dirname + '/config/datastore.yaml', 'utf8'));
var datastore = require(__dirname + '/config/datastore.json');
var mongodb_uri = datastore.mongodb_uri || process.env.MONGODB_URI || 'localhost';

// Include data models
Expand Down
5 changes: 5 additions & 0 deletions config/datastore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"//": "mongodb://<user>:<password>@address:port/dbname",
"//": "Use an empty string for the MONGODB_URI environment variable",
"mongodb_uri": ""
}
2 changes: 0 additions & 2 deletions config/datastore.yaml

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

"socket.io" : "1.3.x",
"moment" : "2.9.x",
"js-yaml" : "3.2.x",
"node-uuid" : "1.4.x"
},
"devDependencies": {
Expand Down

0 comments on commit 5024c9d

Please sign in to comment.