Demo project to deploy front- and backend together on heroku.

Overview

spring-boot-react-bundle

This is a demo project that shows how it is possible to deploy a react frontend and a Spring Boot backend into a heroku dyno. The following paragraphs describe the actions you need to perform.

Creating an heroku app

When creating the heroku app I recommend to use the heroku cli. Use the following commands to create the app and add the required buildpack.

  • heroku create <your-app-name>
  • heroku buildpacks:set heroku/java --app=<your-app-name>

Project structure

The project consists of to sub projects. The react project is located in the frontend directory and the Spring Boot project in the backend directory. To let heroku know that the main project is the Spring Boot project, there is a parent pom.xml in the root directory. That way, when heroku builds checks out the code and starts the build the parent pom and the backend module are built.
To let heroku know that the jar file is now in the target directory of the backend, the Procfile is needed.

Bundling the frontend into the backend jar

The frontend project is built using the com.github.eirslett:frontend-maven-plugin. The maven-resources-plugin is used to copy the content of the resulting build directory to the backend's target/classes/static directory.

Deployment to heroku

Just connect your heroku app and yout GitHub repository on the heroku app's "Deploy"-tab.

You might also like...

A demo of a Shopify site using Astro and React.

Shopify + Astro + React A demo of a Shopify site using Astro and React. If you'd like to learn how it's built and how you can do the same, check out t

Dec 28, 2022

A demo app to illustrate core and latest concepts in Ember.js

ember-workshop A demo app to illustrate core and latest concepts in Ember.js Setup Installation Clone this repo. git clone [email protected]:ijlee2/ember

Dec 17, 2022

Next / React / TS demo to quickly create a landing page

Next / React / TS demo to quickly create a landing page

Jun 27, 2022

A simple demo of React Lottie power to 1st Loggi Frontend Show & Tell

Loggi Frontend Show & Tell - Animações com React Lottie A simple demo of React Lottie power to 1st Loggi Frontend Show & Tell This project was bootstr

Aug 4, 2022

Demo of settingup tailwind 3 (cli) with emberjs

tailwind-setup-demo This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here

Aug 28, 2022

Expo Demo: Screen Capture with Managed Workflow

Expo Demo: Screen Capture with Managed Workflow This code demonstrates how to setup screen capture on an Expo app, without having to eject from the ma

Dec 30, 2022

Twitter-Clone-Nextjs - Twitter Clone Built With React JS, Next JS, Recoil for State Management and Firebase as Backend

Twitter Clone This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn de

Feb 7, 2022

Parcel Next JS - A simple website with Authentication and basic API calls to a backend system.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Jan 2, 2022

Application that show the survey results for backend frameworks to the user in real time.

Application that show the survey results for backend frameworks to the user in real time.

.Net5 Hangfire and SignalR Survey Application Application that show the survey results for backend frameworks to the user in real time. The hangfire j

Dec 17, 2021
This is full stack todo Application which has front end and backend side on my own. So you can try this out. Build using

Full Stack Todo Application Hello Everyone... Here I am sharing some information about the TODO APP which I build using React, Redux, Material UI, Exp

Nayan Ingale 5 Nov 8, 2022
A simple javascript utility for conditionally joining classNames together

Classnames A simple JavaScript utility for conditionally joining classNames together. Install with npm, Bower, or Yarn: # via npm npm install classnam

Jed Watson 16.3k Dec 31, 2022
Website for Together

Together ??‍??‍?? I hope you are well, staying safe and healthy. I have started working remotely during the pandemic. My routine in this time is getti

Khac Vy 2 Oct 29, 2021
A personal project, made with React, React Native, Typescript and some of the most used front-end libraries.

A personal project, made with React, React Native, Typescript and some of the most used front-end libraries.

Alvaro Junior 1 Jul 23, 2022
A simple showcase of how to create a CI/CD to automate nextjs deploy to github pages.

TypeScript & Styled Components Next.js example This is a really simple project that show the usage of Next.js with TypeScript and Styled Components. E

Pedro Frattezi SIlva 3 Apr 27, 2022
Next JS micro front-end project

a project to create micro frontend nextjs app in seconds!

Amirreza 4 Sep 1, 2022
An intro to Three.js and React :) Workshop materials and demo from HackTheNorth 2021

?? Speedy 3D - A Quick Intro to Three.js & React This workshop was originally created for Hack The North 2021! My personal motivation was to: learn th

Anson Yu 8 Dec 17, 2021
A Google Clone which built with ReactJS. You can click the demo and search whatever you want!

Google Clone with ReactJS A small web app that imitate the desktop web version of google site, you can search whatever you want. Google Clone Demo Lin

Özge Coşkun Gürsucu 36 Aug 14, 2022
A Chrome T-Rex game remake using javascript and threejs. Online demo: https://rossning92.github.io/t-rex

T-Rex Game in 3D A Chrome T-rex game remake using javascript and threejs. Build the code Make sure you have node 12+ installed: https://nodejs.org/en/

null 79 Dec 29, 2022
Demo site build in Umbraco v.9.0.0-beta004 and .NET Core 5.0

Umbraco v9 Demo Demo site build in Umbraco v.9.0.0-beta004 and .NET Core 5.0. About this solution: This is a demo site for Umbraco v9 build in the new

Dennis Adolfi 61 Dec 18, 2022