CMS Development

MHlavacka
Member | Platinum Partner
Member | Platinum Partner

Backups and development server

SOLVE

Hi, I am about to develop some sites in HubSpot CMS and I got two questions, maybe you can help me sort it out.

 

  1. It seems like the is no local dev server available for it, meaning that I will be coding on my local PC, but use your CLI client to upload the files to you, and they will only get rendered there. It is super fine at the beginning, when there are no visitors on the site, but what about the future? When I will need to make some changes to the modules I have there - will I have to code it on the live site, meaning that everyone will see the possible errors I make while coding?
  2. I am unable to write any back-end code or access the database storing the content of the site directly. Does that mean that I practically can't write any custom back-end or export my database (take a backup of the site)?
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Backups and development server

SOLVE

Hi @MHlavacka ,

 

1. Depending on the Hub our client has, we will use Serverless functions. But must of the times, our clients do not have the required Hub, so we use an external application instead. You can write that in PHP and host it on a server, but we use NodeJS with Express and host it on Heroku to communicate with HubSpot. You could also create an integration, but that code is not hosted in HubSpot, just uses oAuth to communicate with HubSpot. So you would need to host that code externally as well.

2. Backups are currently not available. It is a much requested feature, but is not available yet. Right now, the only way you can create a backup of certain content types, is by using the export functionality.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

4 Replies 4
MHlavacka
Member | Platinum Partner
Member | Platinum Partner

Backups and development server

SOLVE

Thanks for your time and help 🙂

Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Backups and development server

SOLVE

Hi @MHlavacka ,

 

We use the CLI to sync our local project to HubSpot. For every project, we have a dev portal and a production portal. You can create a test portal by creating a 'Developer Account', which is a 90 day (which can be renewed) portal with all enterprise functionality, or you can create a CMS Developer Sandbox Portal which has no expiring date, and has all CMS functionality.
Cause we use drag and drop templates for all our websites, we code all the templates locally (so each template has all the modules it needs with default content) and sync those to the portals. That way, the templates stay in sync. The HubSpot CMS boilerplate has some great examples. Cause we use the templates to display our modules with dummy content, we can test everything in our sandbox portal before syncing to the production portal. You could even create a setup where you use a git branch to sync to a certain portal by using something like CircleCI.
If you watch the CMS for Developer certification course, you should be able to come up with a plan how you can fit this in your current development proces.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


MHlavacka
Member | Platinum Partner
Member | Platinum Partner

Backups and development server

SOLVE

Thanks @Teun ,

our setup is practically identical to yours. I will have a look at the suggested solution. May I ask about the other part of my question?

 

  1. Where do you write the backend code if you need any? What pragramming language do you actually write it? I can create an external API for it in (for example) Laravel/Lumen, that it will communicate with, but is the the right way to do it? I know that HubSpot has some built in API feature, but I assume you can only use NodeJS there? 
  2. How about backups of the existing content? Is there any was how you can backup and restore it?
0 Upvotes
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Backups and development server

SOLVE

Hi @MHlavacka ,

 

1. Depending on the Hub our client has, we will use Serverless functions. But must of the times, our clients do not have the required Hub, so we use an external application instead. You can write that in PHP and host it on a server, but we use NodeJS with Express and host it on Heroku to communicate with HubSpot. You could also create an integration, but that code is not hosted in HubSpot, just uses oAuth to communicate with HubSpot. So you would need to host that code externally as well.

2. Backups are currently not available. It is a much requested feature, but is not available yet. Right now, the only way you can create a backup of certain content types, is by using the export functionality.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.