How to send data back to Javascript after a GET request

#1

I have already done fetching data from Javascript to Mongoose Web server after a POST command. Now, my goal is to send back requested data to JS.

For example, i will send a string “hello world” back to the javascript to parse and process it. How can be done? Thank you.

#2

Can you please post the code, and add comments at the bottom for the part you want to do but are not sure how.