Heroku Deployement - fullstack application

Hello there,
Some context :
I have a question for deployment.
I have to create an app for my company, it’s more an intranet.
I choose Vue.js for the front and I will choose node.js and express for the back. I think I will go for SQL for the Database.
I have already done some front-end projects with Netlify, but I have never deployed a full stack application. I thought to design my architecture in two folders in one GitHub repository (1. front, 2. back).
I would like to deploy on Heroku. So my questions are :

  • should I deploy both separately - like two apps on Heroku platform ?
  • how can I do that ?

I take every piece of good advices and good practice ! Thank you very much :slight_smile:

Hello!

I would deploy them together.

Build the back end app so that it includes the front end inside the public folder of the node/express (which means you would be serving the front end app from node).

To do this, you can create a script to build the production of the front app, move it to the public folder, and then you would publish the back end folder. All this could be setup using GitHub actions that would then publish the entire stack to heroku for each commit to the main branch (you could set it up so it gets published on pushes to certain tags, branches, etc.).

IIRC, heroku can trigger actions too, which would allow you to build the app just before it gets published (or pulled). But in either case, with GitHub actions you should be able to automate the deploy.

Take a look at GitHub actions docs.

Hope it helps :slight_smile:.

Hello @skaparate !

Thank you for your answser, It helps me a lot !

1 Like

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