how node js global objects works