GithubHelp home page GithubHelp logo

jvogit / spring-react Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 281 KB

My template repo to quickly setup a full-stack web app using Springboot, React (baseweb), and PostgreSQL

Home Page: https://jvogit-spring-react.herokuapp.com

CSS 0.75% HTML 2.93% JavaScript 48.09% Java 48.23%

spring-react's Introduction

spring-react

Spring-React is my template repository for a full-scale web application using SpringBoot, React CRA, and PostgreSQL.

Run build

  1. Run gradlew bootRun to launch app
  2. Find app at localhost:8080

Dev workflow

Before starting to develop run gradlew bootJar

  1. In one terminal gradlew bootRun
  2. In second terminal go into the frontend directory then run npm start

Find the app at localhost:3000 and frontend changes there

Extra

Environment variables used in production deployment

Environment needed during deployment such as heroku

  • JDBC_DATABASE_URL
  • JDBC_DATABASE_USERNAME
  • JDBC_DATABASE_PASSWORD

Note: Above three automatically set by heroku by adding postgresql addon

  • JWT_SECRET (secret used for JWT validation. HS512 at least 512 bits)
  • JWT_EXPIRE_MS (amount of time in milliseconds when an auth token expires)
  • BUILD_TYPE (BUILD_TYPE usually prod for deployment)

Note: prod must be set when running jar (see Procfile)

  • java -Dspring.profiles.active=prod -jar build/libs/jarFile.jar

Extra parameters

  1. gradlew bootRun -PBUILD_TYPE=dev - buildType: prod or dev (default)

gradle cmds

  • gradlew help - help
  • gradlew tasks - view tasks
  • gradlew <task> - run a task

spring-react's People

Contributors

jvogit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.