Insert data into one page app for initial load?

I'm serving a one page app. The app always needs to request initial data from the server once it's loaded.

Is there anyway to dynamically serve data with the initial asset load of css/html/javascript, without rendering it in the html?

Sending a js object with the data so we don't need to ping the server?

inserting a script tag? adding a dynamically created js file to the asset load?

A little bit lost, any help would be really appreciated.

In my opinion, the best way to serve dynamic content from the Node.js server to the client is to use socket.io.

If you don't wanna use socket.io, you can try to create a dynamic page that acts different on the Node.js server, and use XMLHTTPRequests to receive the data.