Best Way to Connect Ghost to MongoDB Atlas

Hi, I’m using the latest Ghost instance hosted through DigitalOcean on Ubuntu 18.04. If it’s helpful, site is https://saysomethingfoundation.org.

I’m looking for a way to connect to and ultimately send/receive data to MongoDB’s Atlas service.

The plan is to create a custom page template in my theme to display auction items whose info will be pulled from Mongo, displayed on a page, and updated with some user input (think bidding for a silent auction).

Any advice? Normally I’d use Mongoose in my server-side files, but I’m not seeing an easy way to get that done through Ghost. I’ve also seen folks connect to Mongo via Nginx as a proxy/reverse proxy stream, but that seems pretty complicated for what I’m trying to do. Must be an easier way.

Thanks,
Jeremy

@Jeremy_Tripp Ghost isn’t designed to have dynamic server-side rendered pages in the manner that you’re expecting. You have two options:

  1. Implement the specific dynamic pages completely outside of Ghost using the server-side language of your choice and then configure your proxy to route those URLs to your newly developed app
  2. Implement your dynamic functionality completely outside of Ghost in your server-side language of choice as an API and then add JavaScript to your pages inside of Ghost to interact with your new API client-side

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