"babel-core" require time

node v4.9.1
version: 2.0.0
endpointsharetweet
var child_process = require("child_process"); var request = require("babel-core"); var path = require.resolve("babel-core"); console.log(path) exports.endpoint = (req, res) => { try { var y = new Date(); child_process.execSync(`node -e 'require("${path}")'`); res.end((new Date() - y).toString()) } catch(e) { console.log(e); res.statusCode = 400; res.end("failed"); } }
Loading…

no comments

    sign in to comment