Giter VIP home page Giter VIP logo

spring-boot-create-react-app's Introduction

###Spring-Boot-Create-React-App Build Status

Initial setup of your machine:

  1. Install Yarn
  2. Run yarn global add flow-typed
  3. Install watchman brew update && brew install watchman

Setup project:

  1. Clone the repo with project name: git clone https://github.com/thomasbem/spring-boot-create-react-app.git <project_name>
  2. cd <project_name>
  3. Run gradle setup: ./setup.sh

When adding new modules to package.json, run flow-typed install. This fetches flow type definitions for npm modules if they exist.

Run front-end for development

  1. cd <project_name>-web
  2. Run yarn run start to startup the front-end with a mock back-end using json-server
  3. Navigate to localhost:3000

Screenshot of the tool

Build and run full stack

  1. Run ./gradlew to build project
  2. cd <project_name>-api/build/libs/
  3. Type java -jar then tab to auto complete to latest version. First time this should be, java -jar <project_name>-0.0.1-SNAPSHOT.jar

How to deploy application to Heroku

  1. Create new app in Heroku
  2. Add .travis.yml to cloned project and replace project-name and heroku-app-name (See code block below)
  3. Push to Github and enabled TravisCI to build the project
  4. Add HEROKU_API_KEY environment variable to Travis with your HEROKU_API_TOKEN (Can be found in Heroku or using Heroku cli - heroku auth:token)
language: java
jdk:
- oraclejdk8
env:
- NODE_VERSION=6
install:
 - nvm install $NODE_VERSION
 - nvm use $NODE_VERSION
 - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
 - sudo apt-get install -y nodejs
 - npm install -g yarn
 - wget https://cli-assets.heroku.com/branches/stable/heroku-linux-amd64.tar.gz
 - tar -xf heroku-linux-amd64.tar.gz
 - ./heroku/bin/heroku plugins:install heroku-cli-deploy
script:
 - ./gradlew
 - ./heroku/bin/heroku jar:deploy _project-name_-api/build/libs/*.jar --app _heroku-app-name_ HEROKU_API_KEY

Now go have fun!

spring-boot-create-react-app's People

Contributors

thomasbem avatar jarlehansen avatar

Watchers

Jiggy avatar James Cloos 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.