ndb
ndb copied to clipboard
Can't access global / process variables
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?
- 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);
- inside ndb, type
process.pid
What is the expected result? The process PID are the same
What happens instead? They are different