configure environment for test in server bitcore.io. util find ref
This commit is contained in:
parent
5855efa566
commit
d145cc6f80
@ -3,13 +3,13 @@ head
|
|||||||
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
||||||
meta(name='viewport', content='width=device-width,initial-scale=1.0')
|
meta(name='viewport', content='width=device-width,initial-scale=1.0')
|
||||||
|
|
||||||
title Mystery
|
title= appName+' - '+title
|
||||||
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
|
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
|
||||||
meta(name="keywords", content="node.js, express, mongoose, mongodb, angularjs")
|
meta(name="keywords", content="node.js, express, mongoose, mongodb, angularjs")
|
||||||
meta(name="description", content="Mystery")
|
meta(name="description", content="Mystery")
|
||||||
|
|
||||||
link(href='/img/icons/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
link(href='/img/icons/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
||||||
|
|
||||||
link(rel='stylesheet', href='/lib/bootstrap/dist/css/bootstrap.min.css')
|
link(rel='stylesheet', href='/lib/bootstrap/dist/css/bootstrap.min.css')
|
||||||
link(rel='stylesheet', href='/css/common.css')
|
link(rel='stylesheet', href='/css/common.css')
|
||||||
|
|
||||||
|
|||||||
5
config/env/test.js
vendored
5
config/env/test.js
vendored
@ -1,16 +1,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
db: "mongodb://localhost/mystery-dev",
|
db: "mongodb://localhost/mystery-test",
|
||||||
app: {
|
app: {
|
||||||
name: "Mystery - Test"
|
name: "Mystery - Test"
|
||||||
},
|
},
|
||||||
|
port: '3301',
|
||||||
bitcoind: {
|
bitcoind: {
|
||||||
user: 'mystery',
|
user: 'mystery',
|
||||||
pass: 'real_mystery',
|
pass: 'real_mystery',
|
||||||
protocol: 'http',
|
protocol: 'http',
|
||||||
host: process.env.BITCOIND_HOST || '127.0.0.1',
|
host: process.env.BITCOIND_HOST || '127.0.0.1',
|
||||||
port: process.env.BITCOIND_PORT || '8332',
|
port: process.env.BITCOIND_PORT || '18332',
|
||||||
},
|
},
|
||||||
network: 'testnet',
|
network: 'testnet',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
var express = require('express'),
|
var express = require('express'),
|
||||||
config = require('./config');
|
helpers = require('view-helpers'),
|
||||||
|
config = require('./config');
|
||||||
|
|
||||||
module.exports = function(app, passport, db) {
|
module.exports = function(app, passport, db) {
|
||||||
app.set('showStackError', true);
|
app.set('showStackError', true);
|
||||||
@ -36,6 +37,9 @@ module.exports = function(app, passport, db) {
|
|||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
app.use(express.methodOverride());
|
app.use(express.methodOverride());
|
||||||
|
|
||||||
|
//dynamic helpers
|
||||||
|
app.use(helpers(config.app.name));
|
||||||
|
|
||||||
//routes should be at the last
|
//routes should be at the last
|
||||||
app.use(app.router);
|
app.use(app.router);
|
||||||
|
|
||||||
@ -66,4 +70,4 @@ module.exports = function(app, passport, db) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -59,7 +59,8 @@
|
|||||||
"grunt-concurrent": "~0.4.2",
|
"grunt-concurrent": "~0.4.2",
|
||||||
"grunt-nodemon": "~0.1.2",
|
"grunt-nodemon": "~0.1.2",
|
||||||
"grunt-mocha-test": "~0.8.1",
|
"grunt-mocha-test": "~0.8.1",
|
||||||
"should": "~2.1.1"
|
"should": "~2.1.1",
|
||||||
|
"view-helpers": "latest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt-contrib-watch": "latest",
|
"grunt-contrib-watch": "latest",
|
||||||
|
|||||||
@ -20,6 +20,4 @@ angular.module('mystery.blocks').controller('BlocksController', ['$scope', '$rou
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// for avoid warning. please remove when you use Blocks
|
|
||||||
$scope.blocks = Blocks;
|
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
33
util/find_ref.sh
Executable file
33
util/find_ref.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FIND='find';
|
||||||
|
|
||||||
|
##if [[ "$OSTYPE" =~ "darwin" ]]
|
||||||
|
##then
|
||||||
|
## FIND='gfind'
|
||||||
|
##fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "$0 : find functions references "
|
||||||
|
echo "Usage $0 function_name "
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXTRA=''
|
||||||
|
|
||||||
|
|
||||||
|
CMD="grep -rnH"
|
||||||
|
|
||||||
|
if [ "$2" != '--nocolor' ]
|
||||||
|
then
|
||||||
|
CMD="$CMD --color=always"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
$FIND -L . -name \*.json -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
||||||
|
-o -name \*.html -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
||||||
|
-o -name \*.jade -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
||||||
|
-o -name \*.js -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} +
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user