Wednesday, 7 June 2017

Displaying Data on Website from DB with Node.js (Without Frameworks)

I have a Node.js webserver and I am fetching data from a mysql Server. The fetched Data needs to be displayed now on the HTML. I am not allowed to use any 3rd Party node.js/JavaScript framework's. (Please dont Question this)

I have 2 Ideas in my mind but dont know what's the right way to do it...

  1. Send Data via JSON to Client and process it with JavaScript. (Possible? and if yes how?)

  2. Before sending the HTTP response, parse the HTML and insert the data. (Complicated without using Frameworks... How?)

Any Help would be appreciated. Thank's.



via Bauer Marius

No comments:

Post a Comment