Server-side JS calls


I wanted to do some Javascript ajax calls before the page loads, IE serverside-JS. I wanted to do this so that I can render some data using handlebars rather then dynamically changing the page after it loads with jQuery etc. Is there a way to make server-side AJAX calls with Ghost?


No. If you absolutely have to do something server-side you could have your own app which proxies to Ghost then modifies the returned HTML before returning that to the client.


What exactly is the use-case? There may be other ways to achieve what you want.


I see. That’s interesting on the proxy. Is there documentation on that?

For this specific case, I’m implementing my own basic search so if a user goes to then that user would get all posts with the word ‘design’ in it. Doing this on the client-side is fine, but it would be most awesome to have no client loading times and just make that call on the server.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.