Code Monkey home page Code Monkey logo

dropwizard-example's Introduction

Dropwizard Example

Running the Application

To check out the example application run the following commands (BTW, make sure to use JDK 7, and IntelliJ 12 FTW :) ).

  • To package the example run (and adapt src/test/resources/jdbc.properties DB credentials; e.g., user postgres...):

     mvn clean package
    
  • To set up the database run (and adapt config settings if applicable):

     psql -c 'create database dropwizard_helloworld'
     java -jar target/dropwizard-example.jar db migrate config.yml
    
  • To run the server run:

     java -jar target/dropwizard-example.jar server config.yml
    
  • Hints:

     curl -i localhost:8080/api/v1/hello-world
     curl -u [email protected]:secret dw-example.herokuapp.com/api/v1/people | python -mjson.tool
    
  • IDE run config: app main class com.example.helloworld.HelloWorldApplication with args server config.yml

Useful Resources

This thing is based on: https://github.com/codahale/dropwizard/tree/master/dropwizard-example

Notes

  • REST API resources are mounted at: /api/v1/ (default credentials: [email protected]:secret)
  • Admin tools are mounted at: /admin (default credentials: admin:admin)
  • Webapp assets are mounted at: /app

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.