Giter Club home page Giter Club logo

ecommerce-micro-service-app's Introduction

Ecommerce Microservice App

This repository hosts the backend service of an Ecommerce Microservice Application. The service is written in Python using the Flask framework and can be built and run inside a Docker container.

Getting Started

These instructions will get you a copy of the backend service up and running on your local machine for development and testing purposes.

Prerequisites

You will need Docker installed on your machine. You can download Docker here.

Clone the Repository

First, clone this repository onto your local machine by using the following command:

git clone https://github.com/cvamsikrishna11/ecommerce-micro-service-app.git

Navigate to the Directory

Change your directory to ecommerce-micro-service-app:

cd ecommerce-micro-service-app

Building the Docker Image

To build the Docker image from the Dockerfile, use this command:

docker build -t ecommerce-backend .

Running the Docker Container

Start a Docker container from the image:

docker run -d -p 5000:5000 --name ecommerce-backend-container ecommerce-backend

The Flask application inside the Docker container will start and listen on port 5000.

Testing the Application

Now, your backend Flask application should be running at http://localhost:5000. You can send HTTP requests to this URL to interact with the application.

If you deploy it in an EC2 instance, enable the security group of instance to accept taffic on port 5000 and access the backend app with Postman app on http://instance-public-ip:5000.

Endpoints

The following endpoints are available:

  • GET / : Returns a welcome message.
  • POST /signup : Creates a new user. Expects a JSON payload with 'username' and 'password' fields.
  • POST /signin : Authenticates a user. Expects a JSON payload with 'username' and 'password' fields.

ecommerce-micro-service-app's People

Contributors

cvamsikrishna11 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.