> but Node.js takes up a lot of resources in a browser
You must be confused. Node.js is used to run JavaScript on the server, not in a browser (the client).
You must be confused. Node.js is used to run JavaScript on the server, not in a browser (the client).