Browse Source

Fixed localhost issue

Edward Bramanti 10 years ago
parent
commit
c8eae4784b
2 changed files with 4 additions and 4 deletions
  1. 2 2
      frameworks/JavaScript/hapi/app.js
  2. 2 2
      frameworks/JavaScript/nodejs/hello.js

+ 2 - 2
frameworks/JavaScript/hapi/app.js

@@ -8,8 +8,8 @@ var cluster = require('cluster'),
 	Hapi = require('hapi'),
 	mongoose = require('mongoose'),
 	async = require('async'),
-	conn = mongoose.connect('mongodb://127.0.0.1/hello_world'),
-	connMap = { user: 'benchmarkdbuser', password: 'benchmarkdbpass', database: 'hello_world', host: '127.0.0.1', charset: 'utf8' };
+	conn = mongoose.connect('mongodb://localhost/hello_world'),
+	connMap = { user: 'benchmarkdbuser', password: 'benchmarkdbpass', database: 'hello_world', host: 'localhost', charset: 'utf8' };
 
 var WorldSchema = new mongoose.Schema({
 		id          : Number,

+ 2 - 2
frameworks/JavaScript/nodejs/hello.js

@@ -19,9 +19,9 @@ var http = require('http')
   , url = require('url')
   , async = require('async')
   , mongoose = require('mongoose')
-  , conn = mongoose.connect('mongodb://127.0.0.1/hello_world')
+  , conn = mongoose.connect('mongodb://localhost/hello_world')
   , MongoClient = require('mongodb').MongoClient
-  , connMap = { user: 'benchmarkdbuser', password: 'benchmarkdbpass', database: 'hello_world', host: '127.0.0.1' };
+  , connMap = { user: 'benchmarkdbuser', password: 'benchmarkdbpass', database: 'hello_world', host: 'localhost' };
 
 if (!windows) {
   var Mapper = require('mapper')