Using sails.js as the framework for the node.js application that I am creating.
I am trying to extract information previously set by the user (e.g. settings for my application) from the back, and then use these parameters in my client side javascript.
I currently have a controller that retrieves information from the database and passes it to the view where it is needed.
return res.view('dashboard', { configs: configurations });
I know that it is available when rendering html, but does not know how to pass it to the javascript environment running in the browser.
Any tips would be awesome!
To clarify, I am not trying to display this information on an html page (i.e. the method of using <%= variable %> , I want to use it in javascript running on the page.
source share