Giter VIP home page Giter VIP logo

shop's Introduction

Shop Service

A Example RESTful web service for managing packages consisting of one or more products. Microservice makes use of an online product service to get products.

Check shop-ui repo for basic UI which consumes Shop service rest APIs.

Service uses Java - Spring ecosystem

Running Service

Docker

You need to have Docker installed

Following command will pull and run the image on machine. This will run shop service with default configuration

docker run -p 8080:8080 arpanps/microservice-shop:0.0.1-SNAPSHOT

The API documentations will be available at the path /api-docs

http://localhost:8080/shop/api-docs/

Interact with application API specification and exercise the endpoints via Swagger UI. Access Swagger UI using below link

http://localhost:8080/shop/swagger-ui/index.html?url=/shop/api-docs

For Development

  • Prerequisite - git, java, maven

  • Clone Repo

    git clone https://github.com/arpanps/shop.git

  • Go inside project directory

    cd shop

  • Build Project with Maven

    mvn install

  • Run Service using Maven

    mvn spring-boot:run

Publishing Docker Image

  • Package project

    mvn clean package

  • Build the docker image (Use your username instead of arpanps)

    docker build -t arpanps/microservice-shop -f etc/docker/Dockerfile .

  • Login with your Docker Id

    docker login

  • Tag the image

    docker tag arpanps/microservice-shop arpanps/microservice-shop:0.0.1-SNAPSHOT

  • Push the image to docker hub

    docker push arpanps/microservice-shop:0.0.1-SNAPSHOT

Technology

  • OpenAPI - OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API

  • Swagger UI - Swagger UI allows anyone — be it development team or end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place.

  • Spring Boot - Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications.

  • Apache Derby - Currently service uses derby, embedded database, for package storage. Derby is very helpful during the development phase, because they are lightweight, fast, quick start time, improve testability, ease of configuration, it lets developer focus more on the development.

  • Hibernate - Hibernate is the most popular ORM framework

  • Actuator - Actuator includes a number of additional features to help you monitor and manage your application when it’s pushed to production, including useful metric, dump and health endpoints.

  • Docker - Docker is a tool designed to make it easier to create, deploy, and run applications by using containers

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

shop's People

Contributors

arpanps avatar

Watchers

James Cloos avatar  avatar

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.