Reputation: 1095
I’m good at jQuery but I’m new to modern js frameworks introduced over the last couple of years. I understand how index.html works in the following example and I can infer that server.js serves the request made from index.html. However, I’m not clear on how server.js gets initialized.
http://codeforgeek.com/2014/07/send-e-mail-node-js/#comment-18703
There does not appear to be a src ref from index.html to server.js which appears to indicate that server.js gets initialized in some other way although that's all I'm able to infer. This is a knowledge gap on my end but can you explain how to initialize server.js so that it can be called by index.html?
Upvotes: 0
Views: 100
Reputation: 731
Node.js is a platform built on top of javascript. Non blocking threads due to its asynchronous behaviour, still event driven.
Node.js provision many use cases. You can refer this & this.
Coming to your point is required to create a webserver on top of node.js http/https modules. Once this server started by nodejs, it is ready to serve http clients.
Open source dev communities built some of great web app framework like express which are easy to learn. github, npmjs are full of great node modules / packages which are ready to plug into your app.
Upvotes: 1