Ghost custom front end

Hi, I am trying to make a blog using Ghost as a headless CMS(self-hosted), Svelte as my frontend and Expressjs for the backend. What I don’t understand is that to get content from Ghost I have to host the ghost server and then host the express server, and get content from Ghost through the content api. But I don’t want two servers, I only want one. My end goal is to have a Svelte frontend with content from Ghost.

Hey @creonico :wave:
What do you need the Express server for? I would’ve thought you’d have your self-hosted Ghost install and then a Svelte front-end hosted on something like Netlify that brings in content from your Ghost site using the Ghost Content API. I don’t think the extra Express server is needed :slight_smile:

Hi @DavidDarnes, I have the express server so I can see my frontend. I don’t know how to connect my frontend to the ghost server. When I go into the ghost server(localhost:2368) I don’t see my frontend, I see the ghost default site. Also, I don’t know what Netlify is or what is used for. How does that work, how can I host the frontend and then get content from Ghost? Would I have to have Ghost open in my computer all the time?

Sounds like you need to do some more investigation into frameworks that can use Ghost as a headless CMS. A lot of Static Site Generators (SSGs) don’t need to be ran within an Express server and can be run on their own via a command. Take a look at some of these and their linked documentation:

Netlify is a hosting platform where all of the above SSGs can be deployed and hosted. In order to use these SSGs on a live domain they’ll need to source the content from a Ghost installation. You’d need a production version of Ghost running, either by running it on a hosting platform like Digital Ocean, or on Ghost(Pro) rather than running it locally like you have at localhost:2368.

Hope that makes sense :slight_smile: