GithubHelp home page GithubHelp logo

dropwizard-example's Introduction

dropwizard-example

Welcome to the world of dropwizard. With this example, you'll have an simple, fully instrumented "Hello, World" application up and running in minutes. Let's do it.

Make sure you have simple-build-tool installed.

  1. Clone this example repo.

     git clone https://github.com/codahale/dropwizard-example.git
    
  2. cd into the new directory.

  3. Now we'll easily build a fat JAR of our project and its dependencies:

     sbt update	
     sbt assembly 
    

    The sbt assembly command uses assembly-sbt (included with dropwizard) to handle the hard work. That JAR should end up somewhere like target/scala_2.8.1/dropwizard-example-assembly-1.0-SNAPSHOT.jar

  4. Start the HTTP server, using the provided configuration file.

     java -jar target/scala_2.8.1/dropwizard-example-assembly-1.0-SNAPSHOT.jar server example.conf.template
    
  5. Open up your browser and point it at http://localhost:8080/hello-world. Boom.

  6. Throw in a query parameter. http://localhost:8080/hello-world?name=Martin. The id is auto-incremented and the given name will appear.

  7. Now for the really fun part. Point your browser to http://localhost:8081/ and you'll find operational data, health checks, and more. Dropwizard ships with metrics, which provides tons of valuable data about your application and its production environment.

  8. And now go build some awesome services.

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.