Part of a complete node.js series, including the usage of Express.js and much more! Outputting plain text isn’t too exciting. Let’s learn how to respond with a …
Original source
Part of a complete node.js series, including the usage of Express.js and much more! Outputting plain text isn’t too exciting. Let’s learn how to respond with a …
Original source
32 responses to “Node.js – Tutorial – Rendering HTML as Response”
why do you use a dark screen sir ?
Can we display data(from javascript variables) on that index.html file?
You are the best. Another clearly described subject
Thank you for this, i was looking for how to connect my app.js to an html page and I did not know what is the word i should google for in this case, it was rendering XD.
and can you do something about the audio it was to hard for me to understand
how to show loading message to the client through server ???
I spent hours trying to figure this out (fs.readFile(…) and response.write(…)) and researching for how to render files. Thank you!
audio quality in 4th and 5th video is kind of ECHO……. booooooom booooooom
Hi, thank you for the great video! I've got one question:
After reading the html file in server.js, is there a way to edit the content of html before sending it to client as a response? Any recommended way of doing this?
The whole picture is I'm trying to write a simple server using Nodejs. It will render a default html to client (browser). In the default html, there are some buttons and options. Clients can send requests using those buttons and options. After receiving requests, the server will modify the content of html file (will need to use data from server side) and send it back as a response.
Am I doing it this correctly? Or there is other preferred ways?
Every beginner need to watch your video. It is useful to me. Thank you
What's your enviroment?
Hi i have been trying your way for a quick project of mine and in my html file there's 1 picture in it, but it just keeps saying that it cant load.
I like your clear and detailed way of explaining. Keep up the great work!
It will be helpful if you improve your voice sound, excellent video though
Loved it.
Thank you for the great tutorial. It could use a louder sound you know (and maybe a bit cleaner voice).
bad sound. get a better, closer mic
you need a better microphone bro good tutorials but audio is horrible
Мужик красава. Все четко объясняет.
Hi Max,
you said we need to call response.end() inside our callback otherwise we may send our response even before we read our file. why so?
Thanks buddy ,great series starting from very basics so one can head start on own..
I like your vedio . this really helps me a lot. You are gr8 instructor . i like the way you explain things . You are too gud.
You are WONDERFUL tutor! Thank you!
Clear and to the point. Very good explanation.
Thanks very much
awesome
tried to use img src in the index.html to display an image, but no image was displayed. why?
damn son, who knew Seth Rogen would be such a cool teacher!
good explanation, if i change content in index.html , does it update dynamically, with out run js file on cmd all the times, when ever i change file. just like log file to shown all updates on the browser
Love your Nodejs videos. So well explained!
For anyone who is having issues where when you type in a different path, your page isn't changing, try looking at npm nodemon. That solved my issue. Restarts the server when a change is made.
Well explained but can you please describe/or suggest how can I include external css, JS and images into with HTML using NodeJS?? All I'm geting through this was displaying html content only??
WARNING: If you're a rookie using the new version of Node (8.0), you'll probably run into weird errors during this tutorial. At least I did. I had to downgrade to an older version of Node and then everything went smoothly. Great tutorial series, btw.