Node.js originally used CommonJS (require/module.exports). ES modules (import/export) are supported with .mjs or 'type': 'module' in package.json. Browsers use ES modules natively (import/export) with <script type='module'> or classic scripts with <script>.
What module system does Node.js use vs the browser?
More FAQs in How Browsers and Node.js Use V8 Differently
Yes. Both use V8. The engine (call stack, heap, parser, compiler, GC) is the same. But the runtime around V8 is different: browsers provide DOM, rendering, and Web APIs; Node.js provides file system, networking, and system-level APIs.
The browser event loop renders between macrotasks and has requestAnimationFrame. Node.js uses libuv's event loop with specific phases (timers, poll, check, close) and has process.nextTick (runs before promise microtasks) and setImmediate. No rendering in Node.js.
fs (file system), http/https (server), net/dgram (raw networking), process (argv, env, exit), Buffer (binary data), stream, path, os, crypto, child_process, cluster. These give Node.js full system access.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.