register mongo index, fix postgres bug
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/indexFiles/postgresIndex.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/indexFiles/postgresIndex.js
index 394e377..b8aec59 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/indexFiles/postgresIndex.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/contentAssist/indexFiles/postgresIndex.js
@@ -23,7 +23,7 @@
     					"!type" : "fn()"
     				},
     				"connect" : {
-    					"!type" : "fn(config: Object, callback: fun())"
+    					"!type" : "fn(config: Object, callback: fn())"
     				},
     				"cancel" : {
     					"!type" : "fn(config: Object, client: Client, query: Query)"
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
index f5cfd77..000902a 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
@@ -13,6 +13,7 @@
 /*jslint amd:true*/
 define([
 	'javascript/astManager',
+	'javascript/contentAssist/indexFiles/mongodbIndex',
 	'javascript/contentAssist/indexFiles/mysqlIndex',
 	'javascript/contentAssist/indexFiles/postgresIndex',
 	'javascript/contentAssist/indexFiles/redisIndex',
@@ -25,7 +26,7 @@
 	'orion/editor/stylers/js/js',
 	'orion/editor/stylers/json/json',
 	'orion/editor/stylers/jsonSchema/jsonSchema'
-], function(ASTManager, MysqlIndex, PostgresIndex, RedisIndex, ContentAssist, EslintValidator, Occurrences, Outliner,
+], function(ASTManager, MongodbIndex, MysqlIndex, PostgresIndex, RedisIndex, ContentAssist, EslintValidator, Occurrences, Outliner,
 		i18nUtil, PluginProvider, mJS, mJSON, mJSONSchema) {
 
 	/**
@@ -212,6 +213,11 @@
 		type: "tern",
 		defs: PostgresIndex
 	});
+	provider.registerServiceProvider("orion.core.typedef", {}, {
+		id: "node.mongodb",
+		type: "tern",
+		defs: MongodbIndex
+	});
 
 	provider.connect();
 });