? trace ? tmp

This commit is contained in:
Mark Nadal 2020-02-02 22:30:13 -08:00
parent 75148ec540
commit a980f4efc1
4 changed files with 29 additions and 3 deletions

View File

@ -1 +1 @@
web: node --inspect examples/http.js
web: node --inspect trace.js

View File

@ -1,8 +1,8 @@
;(function(){
var cluster = require('cluster');
/*var cluster = require('cluster');
if(cluster.isMaster){
return cluster.fork() && cluster.on('exit', function(){ cluster.fork() });
}
}*/
var fs = require('fs');
var config = { port: process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8765 };

View File

@ -68,6 +68,7 @@
"mocha": "^6.2.0",
"panic-manager": "^1.2.0",
"panic-server": "^1.1.1",
"0x": "^4.9.1",
"uglify-js": "^3.6.0"
}
}

25
trace.js Normal file
View File

@ -0,0 +1,25 @@
;(async function start(){
var z;
try{ z = require('0x');
} catch(e){
return require('./examples/http.js');
}
function go(){
start();
setTimeout(function(){try{
var zip = require("child_process");
zip.execSync('zip -r flame *', {cwd: './flame'});
require('./lib/fsrm')('./flame');
require('./lib/email').send({
text: "zip attached",
from: "mark@gun.eco",
to: "mark@gun.eco",
subject: "TRACE GUN",
attachment:[{path:"./flame.zip", type:"application/zip", name:"flame.zip"}]
}, function(err){
err && console.log("@@@@@@@@@@ EMAIL ERROR @@@@@@@@@@", err);
})
}catch(err){ console.log("@@@@@@@@@@ TRACE ERROR @@@@@@@@@", err) }},5000);
}
require('0x')({argv: ['./examples/http.js'], outputDir: 'flame', workingDir: __dirname, onProcessExit: go});
}());