Glidera service
This commit is contained in:
parent
1f1007a552
commit
792c20b040
7 changed files with 71 additions and 44 deletions
30
util/buildExternalServices.js
Executable file
30
util/buildExternalServices.js
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var file;
|
||||
|
||||
try {
|
||||
file = fs.readFileSync('./externalServices.json', 'utf8');
|
||||
} catch(err) {
|
||||
return;
|
||||
}
|
||||
|
||||
var externalServices = JSON.parse(file);
|
||||
if (externalServices.coinbase &&
|
||||
externalServices.coinbase.production.client_id)
|
||||
console.log('Coinbase Production Enabled');
|
||||
if (externalServices.coinbase &&
|
||||
externalServices.coinbase.sandbox.client_id)
|
||||
console.log('Coinbase Sandbox Enabled');
|
||||
if (externalServices.glidera &&
|
||||
(externalServices.glidera.production.mobile.client_id || externalServices.glidera.production.desktop.client_id))
|
||||
console.log('Glidera Production Enabled');
|
||||
if (externalServices.glidera &&
|
||||
(externalServices.glidera.sandbox.mobile.client_id || externalServices.glidera.sandbox.desktop.client_id))
|
||||
console.log('Glidera Sandbox Enabled');
|
||||
|
||||
var content = 'window.externalServices=' + JSON.stringify(externalServices) + ';';
|
||||
fs.writeFileSync("./src/js/externalServices.js", content);
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var file;
|
||||
|
||||
try {
|
||||
file = fs.readFileSync('./coinbase.json', 'utf8');
|
||||
} catch(err) {
|
||||
return;
|
||||
}
|
||||
|
||||
var json = JSON.parse(file);
|
||||
console.log('Coinbase Client ID: ' + json.client_id);
|
||||
|
||||
var content = 'window.coinbase_client_id="' + json.client_id + '";';
|
||||
content = content + '\nwindow.coinbase_client_secret="' + json.client_secret + '";';
|
||||
fs.writeFileSync("./src/js/coinbase.js", content);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue