mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-23 12:52:15 +00:00
Test ruby subprocess in heroku
This commit is contained in:
parent
b6a7190b51
commit
edf4301557
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ var Marshal = require("marsha");
|
|||
var querystring = require('querystring');
|
||||
var config = require(path.join(__dirname, "../../config/config"));
|
||||
const SECRET_TOKEN = config.secret_token;
|
||||
var childProcess = require("child_process").exec;
|
||||
|
||||
const MAP_CATEGORY = 45;
|
||||
const SERVER_CATEGORY = 45;
|
||||
|
@ -91,6 +92,10 @@ EnslClient.decodeSession = sessionCookie => {
|
|||
// Verify signature
|
||||
if (crypto.createHmac("sha1", SECRET_TOKEN).update(text).digest('hex') !== signature) return null;
|
||||
|
||||
childProcess('ruby -e "puts \'Hello World!\'"', function (err, stdout, stderr) {
|
||||
console.log(stdout);
|
||||
});
|
||||
|
||||
var parsedSession;
|
||||
try {
|
||||
parsedSession = Marshal.load(text, 'base64');
|
||||
|
|
Loading…
Reference in a new issue