I am new to node js. These are my questions
http://localhost:1234/ -> index.html or http://localhost:1234/Users.html -> users.htmlThese are my doubts. I made a small server which can able to display static html. But I need to hard code the physical file. That is working, but when I changed my html which contains reference to jquery files. it display file not found in console.
I am working in a windows 7 machine.
1 Yes, node.js can serve html pages with images, css or javascript
2 Yes, you can set different pages for different URL's
3 Your choice, but you should to stick to folder structure, its better to be organised right. Here's a typical structure.
├───node_modules // installed npm packages
│ ├───.bin
│ ├───express
│ ├───jade
├───public
│ ├───data //created for other files
│ ├───img //all my image files
│ ├───javascripts //all my js files
│ └───stylesheets //all my css files
├───routes //handling routes for urls
├───Temp //created by me for temp stuff
└───views //all the static files you want to put
4 Yes, node.js can accept/respond to AJAX requests
file not found is the error you get when you specify incorrect file location. If you use relative paths in your code like ./view rather than /view, it is relative to where you start the node.js server.
A lot of what you're asking about comes down to "How do I serve static content using Node?" And for that I recommend Express, which is documented here: http://expressjs.com/api.html - specifically the "static" serving features, which will let you serve whole files from a directory, easily, within Node, even if your program also serves dynamic content.