ndb icon indicating copy to clipboard operation
ndb copied to clipboard

Can't access global / process variables

Open FlorentMasson opened this issue 5 years ago • 0 comments

I'm launching a simple uWebSockets.js app with ndb I can't seem to be able to access the same global and process objects from the console, only when I set breakpoints

Tell us about your environment:

  • ndb version: 1.1.15
  • Platform / OS version: Windows 10
  • Node.js version: 12.14.0

What steps will reproduce the problem?

  1. start a simple uws app with nbd
const uWS = require('uWebSockets.js');
const port = 3000;
let listenSocket;

const app = uWS.App({
}).ws('/*', {
}).any('/*', (res, req) => {
    /* Let's deny all Http */
    res.end('X');
}).listen(port, (token) => {
    listenSocket = token;
    if (token) {
        console.log('Listening to port ' + port);
    } else {
        console.log('Failed to listen to port ' + port);
    }
});

console.log("PID is "+process.pid);
  1. inside ndb, type process.pid

What is the expected result? The process PID are the same

What happens instead? They are different

FlorentMasson avatar Dec 18 '19 15:12 FlorentMasson