GithubHelp home page GithubHelp logo

todorow / quote-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gtiwari333/spring-boot-keycloak-angular-quote-app

0.0 1.0 0.0 1.43 MB

Java Backed - Spring Boot / Ionic mobile app

Home Page: http://ganeshtiwaridotcomdotnp.blogspot.com/

TypeScript 23.93% HTML 13.45% CSS 15.65% JavaScript 3.98% Java 42.99%

quote-app's Introduction

Spring boot REST API and Ionic/Angular mobile app - example

Overview

  • A sample app to demonstrate Spring Boot - Ionic mobile app
  • The server scraps the websites (uses JSoup) to read Quotes and store into db.
    • see g.t.quote.scrapper.WebScraper
  • The client (mobile app) will randomly display such quotes. Has an ability to record and display view count.

Mobile Client - Ionic3 App

  • Follow installation steps from https://ionicframework.com/docs/v1/guide/installation.html
  • Download android SDK and add ANDROID_HOME. It was C:\Users\gt\AppData\Local\Android\Sdk
  • Generate APK file: ionic cordova build --release android
  • DEV/PROD environment --> currently we need to manually comment/uncomment mobile/src/app/app.constants.ts for SERVER_API_URL
    • Ionic 4 will have default support for environment variables

Server: Spring Boot

  • Uses JSoup to parse the quote websites and stores into H2 database at startup
  • Quotes can be retrieved by REST apis HOST/quotes
  • Deploy to Heroku
  • Did below updates for Heroky. Since its a multi module Maven app:
    • Added file: Procfile web: java -jar server/target/server-0.0.1-SNAPSHOT.jar -Dserver.port=$PORT
    • Added server.port entry on application.yml server: port: ${PORT:8080}

How to run/test Locally or in Mobile device?

  • Start Server : Run g.t.quote.QuoteApplication
  • Start client
    • Comment/Uncomment the line to use
      • localhost:8080 to use local server
      • https://gt-quote-app.herokuapp.com/ to use app deployed on heroku
    • cd to mobile directory and run ionic server and ionic open
  • To generate APK
    • Follow https://ionicframework.com/docs/v1/guide/publishing.html
      • Make sure app.constants.ts is pointing to heroku app URL
      • Run ionic cordova build --release android
      • Grab the debug version of apk app-debug.apk and copy to your android device and install the APK
        • It should be FOLDER\quote-app\mobile\platforms\android\app\build\outputs\apk\debug\

Prerequisite

  • Node
  • NPM/Yarn
  • Ionic cli
  • Android SDK
  • Maven
  • JDK 1.8

quote-app's People

Watchers

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.