Skip to content

dwildt/bankaccount-travis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bankaccount-travis

Build Status

Manage Bank Accounts. Simple Java project to show more about Test Driven Development and object oriented design, using:

  • Java
  • Ant
  • Maven
  • Spring Boot
  • Heroku deploy
  • More to come (ant + ivy / cpd / pmd / coverage / other test approaches / gradle option)

Run Ant Build + Unit Tests (use build.xml)

  • To run tests: "ant test"

Run Maven Build + Spring Boot API (pom.xml)

  • download dependencies: "mvn install"
  • run spring-boot API: "mvn spring-boot:run"
  • Sample request:
    • add Account: "/add?name=51987654321&balance=500"
    • check balance: "/balance?name=51987654321"
    • withdraw: "withdraw?name=51987654321&value=200"
    • if using curl for testing, use something like "curl \ --data-urlencode "name=51987654321" \ --data-urlencode "value=500" \ http://localhost:8088/add"
  • Default port is 8080. If you want to change, check resources/application.properties.

Running this project using AWS Cloud9 IDE

  • Update yum and java and dependencies. Reference
    • I'm using Amazon Linux, so:
      • update packages: sudo yum -y update
      • install java 8: sudo yum -y install java-1.8.0-openjdk-devel
      • update java version used: sudo update-alternatives --config java
      • update javac version used: sudo update-alternatives --config javac
      • install maven:
      • now you can run mvn install and mvn spring-boot:run

To run this project @ Heroku

  • Install Heroku Client on your setup.
  • Create a new remote to heroku: "heroku create choose-a-project-name". This will create a choose-a-project-name.herokuapp.com so you can access your app after deployment. If you only use a "heroku create", Heroku will create a slick name for you.
  • Send the project to heroku: "git push heroku master"
  • If something is not right, check heroku logs, using "heroku logs --tail"
  • You can test a sample using my install at https://bankaccount-travis.herokuapp.com

About

Bank Account Travis CI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages