Hacker News new | ask | show | jobs
by utopiah 92 days ago
Could use a WASM environment to run tests or a companion app that run wrap in a (Podman) container, to be safe, e.g :

   const { exec } = require("child_process");
    const express = require('express');
    const app = express();

   app.get('/', (req, res) => {
        exec("req", (error, stdout, stderr) => {
            res.json({error, stdout, stderr}) })
        }); 
    });
   
   app.listen(3000);
I'm not saying it's perfect but took me a minute.