We are looking for a way to be able to make API calls via Node.js from other sources, and would like to expose that data to HBS when building some of the templates/views/pages out.
I know that Pug allows us to expose data to the view when building the project. Is there a way to modify the underlying Node.js implementation in Ghost to be able to make API calls, expose data to HBS, access data in other server-side technologies like Mongo, etc.?
What exactly are you trying to do? A lot of what you said seems possible but it’s usually not suggested to do because you end up branching off of the standard Ghost installation. There’s usually a method to do what you want without modifying the core
We are trying to build custom UI elements to include on pages (in the template), such UI elements that connect to a database on the server-side, or even build out an Angular based component.
We are looking to extend Ghost past just a blogging platform.
Interesting! If I’m understanding what you’re saying, there’s no real dependency on Ghost, rather non-ghost APIs? If that’s the case, I would suggest bundling the components with your theme, including hardcoding your API endpoint. Then configure your load balancer / proxy to requests to the API endpoint where it normally would go.
Ghost is quite flexible, and has a powerful content api, allowing you to use it in a headless manner as well, if that might make life easier