Git Product home page Git Product logo

myfridge's Introduction

myFridge

This project contains a small Java Rest Backend written with the Jersey Framework, Swagger and is builded by gradle.

Contents

1. Getting started

1.1 Run it in Linux

  • You need to have a valid JDK installed. See 1.4 for how to install Java from Oracle.
  • Download & extract the project
wget https://github.com/DeusProx/myJerseyRest/archive/master.zip
unzip master.zip
cd myJersey-Rest
  • Run the gradle wrapper
./gradlew clean build appRun

1.2 Run it in Windows

gradlew.bat clean build appRun

1.3 Use it

Now you can reach our Swagger application by opening http://localhost:8080/myJerseyRest in your favorit browser. Swagger lists every resource of your API and provides an easy way to test your implemented functions. alt text The real API is reachable via the url http://localhost:8080/myJerseyRest/api and the api-docs created by swagger are reachable under http://localhost:8080/myJerseyRest/api/api-docs.

1.4 Start developing (Linux)

  • install java & git & gradle
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt-get install oracle-java8-installer git gradle
  • clone the repository
mkdir ~/git
git clone https://github.com/DeusProx/myJerseyRest
cd myJerseyRest
  • change some code
  • run it with gradle
gradle clean build appRun

Code structure

src/
    main/
        java/.../myJerseyRest
            resources/                  <-- The directory where we place our REST Resources for our API
                Example.java            <-- An Example Resource
            SwaggerJaxrsListener.java   <-- Creates the api-docs
            WebApplication.java         <-- Bootstraps our REST resources
        webapp/*                        <-- Place where our Swagger-UI Webapp is
build.gradle    <-- gradle build management file
gradlew         <-- gradle wrapper for linux; run this if you are on linux and don't have gradle installed
gradlew.bat     <-- gradle wrapper for windows; run this if you are on windows and don't have gradle installed
gretty.plugin   <-- plugin which runs an embedded webserver (jetty)

Committers

Developed by
    Gordon Lawrenz <[email protected]>

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.