config and user dummies, plus removed require calls from modules since it is no longer supported

This commit is contained in:
Dominic Bosch 2013-11-19 08:05:52 +01:00
parent d385ef6163
commit 33318f4cba
11 changed files with 18 additions and 18 deletions

1
config/.gitignore vendored
View file

@ -1 +0,0 @@
config.json

6
config/config.json Normal file
View file

@ -0,0 +1,6 @@
{
"http_port": 8125,
"db_port": 6379,
"crypto_key": "[choose_a_safe_cypto_key(max_256_bit)]",
"session_secret": "[choose_a_safe_session_key]"
}

View file

@ -1,6 +1,6 @@
{
"dominic": {
"password": "test",
"password": "[change this]",
"roles": [ "admin" ]
}
}

View file

@ -96,12 +96,13 @@ function init() {
}
/**
*
* admin commands handler receives all command arguments and an answerHandler
* object that eases response handling to the HTTP request issuer.
*/
function handleAdminCommands(args, answHandler) {
if(args && args.cmd) {
var func = adminCmds[args.cmd];
if(func) func(args, answHandler);
if(typeof func == 'function') func(args, answHandler);
} else log.print('RS', 'No command in request');
setTimeout(function(ah) {
answHandler = ah;
@ -139,4 +140,7 @@ process.on('message', function(cmd) {
*/
procCmds.die = shutDown;
/*
* *Start initialization*
*/
init();

View file

@ -1,6 +1,5 @@
'use strict';
var needle = require('needle');
/**
* ProBinder ACTION MODULE
*/

View file

@ -1,6 +1,8 @@
var fs = require('fs'),
path = require('path');
log.print('action testing.js');
log.print(module);
log.print(module.exports);
console.log(exports);
console.log(module.exports);
/*
// Hacking my own system...
console.log(module.parent.parent.children[0].exports.getEventModuleAuth('probinder',

View file

@ -1,6 +1,4 @@
'use strict';
var needle = require('needle');
/**
* Call any arbitrary webAPI.

View file

@ -1,7 +1,5 @@
'use strict';
var needle = require('needle');
var urlService = 'http://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&exchars=200&explaintext&titles=Computer%20science';
//http://www.mediawiki.org/wiki/API:Search
/*

View file

@ -1,7 +1,5 @@
'use strict';
var needle = require('request');
/*
* EmailYak EVENT MODULE
*/

View file

@ -1,5 +1,3 @@
var fs = require('fs'),
path = require('path');
/*
// Hacking my own system...

View file

@ -1,6 +1,4 @@
var needle = require('needle');
var urlService = 'http://api.openweathermap.org/data/2.5/weather',
credentials,
old_temp;