I am new to Express and Nodejs. I am trying to call an external api to create data on a page. Is there a way to call an external api from an expression (I know I can use http moduel for this), but I want to confirm that this is the best way. Also, as soon as I get json back, how to pass it to the view.
Currently, I have made a workaround by simply loading the view (headers only) with an expression and making a jQuery ajax api call and populating the data.
SaNmm source share