Chrome extensions and Node.js and Express.js

The chrome extension uses a V8 engine, and Node.js also uses the same engine. When programmers build chrome extensions do they use node.js and experss.js?

A typo, presumably. This should be:

The Chrome browser uses the V8 engine.

This is correct.

Nope. These are two entirely different contexts. The V8 engine is integrated into a number of independent projects which have nothing to do with each other.

When you write a Chrome extension, it is run in the context of the Chrome browser. Any JavaScript in your Chrome extension is executed in the V8 engine integrated in Chrome.

When you write a Node app, any server-side JavaScript is executed in the V8 engine integrated in Node.

The Chrome browser knows nothing of Node or express. And likewise, your node/express app knows nothing of the Chrome browser.

Does that make sense?

If you are a bit confused as to what Node is, you can check out the first couple of paragraphs of this article:

3 Likes

Yes.

True.

Thanks for the help.

If someone wants to want to build a chrome extension in Node+Express+MongoDB, would that be possible?

Not really. Those technologies run on a server, not in your browser (as a Chrome extension does).

You could of course make an API using Node, Express & MongoDB, which runs on a server somewhere, then have your Chrome extension fetch data from that.

1 Like

Got it, Thank you so much.

1 Like