Git Product home page Git Product logo

sort-app's Introduction

Introduction

A demo app showing sorting of random numeric values provided in CSV format. It uses Dropwizard framework, Google guice, hibernate, h2 DB and Java 8.

Running The Application

To test the sort-app, run the following commands.

  • To package the application, run the following from the root directory.

      mvn package
    
  • To setup the h2 database run.

      java -jar sort-app-web/target/sort-app-web-1.0-SNAPSHOT.jar db migrate sort-app.yaml
    
  • To run the server run.

      java -jar sort-app-web/target/sort-app-web-1.0-SNAPSHOT.jar server sort-app.yaml
    
  • It accepts list of numbers to be sorted in CSV format e.g "10,2,3,90,40" To post data into the application.

    curl -H "Content-Type: text/plain" -X POST -d '5,8,1,2,0' http://localhost:8080/sortNumbers

  • To see the details of the already sorted input numbers, open http://localhost:8080/sortNumbers or curl -X GET http://localhost:8080/sortNumbers

  • Dropwizard provides nice metrics on http://localhost:8081

Configuring Application

You can add or change configurations in sort-app.yaml file in the root directory.

TODO

  • UI for providing numbers to sort and displaying all the previous result.
  • More test coverage
  • Pagination support
  • Validations
  • Logging

sort-app's People

Watchers

 avatar

Forkers

lgtm-migrator

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.