mirror of
https://github.com/Hopiu/webapi-eca.git
synced 2026-04-11 18:31:03 +00:00
config and user dummies, plus removed require calls from modules since it is no longer supported
This commit is contained in:
parent
d385ef6163
commit
33318f4cba
11 changed files with 18 additions and 18 deletions
1
config/.gitignore
vendored
1
config/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
config.json
|
||||
6
config/config.json
Normal file
6
config/config.json
Normal 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]"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"dominic": {
|
||||
"password": "test",
|
||||
"password": "[change this]",
|
||||
"roles": [ "admin" ]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
var needle = require('needle');
|
||||
/**
|
||||
* ProBinder ACTION MODULE
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
var needle = require('needle');
|
||||
|
||||
/**
|
||||
* Call any arbitrary webAPI.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
var needle = require('request');
|
||||
|
||||
/*
|
||||
* EmailYak EVENT MODULE
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
var fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
/*
|
||||
// Hacking my own system...
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
var needle = require('needle');
|
||||
|
||||
var urlService = 'http://api.openweathermap.org/data/2.5/weather',
|
||||
credentials,
|
||||
old_temp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue