Browse Source

Fixed sed command for mongodb.

Edward Bramanti 10 years ago
parent
commit
adf326d2ea

+ 1 - 1
frameworks/JavaScript/koa/app.js

@@ -11,7 +11,7 @@ var koa = require('koa')
 // Monk MongoDB Driver Deps
 var monk = require('monk')
   , wrap = require('co-monk')
-  , db = monk('localhost/hello_world')
+  , db = monk('mongodb://localhost/hello_world')
   , worlds = wrap(db.get('world'))
   , fortunes = wrap(db.get('fortune'));
 

+ 1 - 1
frameworks/JavaScript/koa/setup.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-sed -i 's|mongodb//.*/hello_world|mongodb//'"${DBHOST}"'/hello_world|g' app.js
+sed -i 's|mongodb://.*/hello_world|mongodb://'"${DBHOST}"'/hello_world|g' app.js
 
 export NVM_HOME=${IROOT}/nvm
 # Used to avoid nvm's return 2 error.

+ 1 - 1
frameworks/JavaScript/nodejs/setup.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 sed -i 's|localhost|'"${DBHOST}"'|g' hello.js
-sed -i 's|mongodb//.*/hello_world|mongodb//'"${DBHOST}"'/hello_world|g' hello.js
+sed -i 's|mongodb://.*/hello_world|mongodb://'"${DBHOST}"'/hello_world|g' hello.js
 
 export NODE_ENV=production
 export NVM_HOME=${IROOT}/nvm