+ 1

Node.js question

I’m just starting to learn node and I’m pretty confused, and have a few questions 1. Say I have a regular html/css/js website I made, how would you connect the node file to my web files? 2. What would it actually be used for? I.e I have a website, what would I need to use node for that web based js couldn’t achieve? Thanks for the help, I hope my questions make sense

12th Jan 2022, 1:16 AM
Alex
Alex - avatar
1 Respuesta
0
Node.js is used to run JavaScript code as a normal program instead of running it in a web browser. There are many reasons you might want to do that, for example server side development. There are a lot of very useful and powerful libraries written for node.js, for example Express, which is used to create servers. So, to answer your questions: Node.js isn't meant to be used like you think it is. You don't connect a node file to a website, node.js code runs on its own, outside a website or web browser.
12th Jan 2022, 11:06 PM
inxanedev!
inxanedev! - avatar