+ 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
1 Answer
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.