Giter Site home page Giter Site logo

codeansh / auctionize Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

Two microservices(Auth and Auction) running independently. Admin ( aunthenticated by an static api secret ) can create/read/update/delete auctons and users . Users( Authenticated by jwt token ) can make bids on active auctions.

Dockerfile 2.88% Python 97.12%
flask python3 docker-compose mongoengine pydantic

auctionize's Introduction

Seller API's

Make bids on Auctions created by Admin

Run Locally

Clone the project

git clone https://github.com/Codeansh/microservices

Create a new file named .flaskenv inside microservice/auction_service

Structure should look like this :

-> microservices
-> auction_service
-> .flaskenv

Set Environment variables in .flaskenv file :

FLASK_APP=app
FLASK_DEBUG=True
ADMIN_AUTH_KEY=GENERATE YOUR OWN KEY
SECRET_KEY==GENERATE YOUR OWN KEY

Like above, create a new file named .flaskenv inside microservice/auth_service

Structure should look like this :

-> microservices
-> auth_service
-> .flaskenv

Set Environment variables in .flaskenv file :

FLASK_APP=app
FLASK_DEBUG=True
ADMIN_AUTH_KEY=GENERATE YOUR OWN KEY
SECRET_KEY==GENERATE YOUR OWN KEY
UNAUTHENTICATED_ROUTES=['/auth/signup','/auth/login']

Run the script in terminal ( Docker-Compose should be installed )

docker-compose up --build

Auction Service will be listening on http://localhost:5001/
Auth Service will be listening on http://localhost:5000/
To be Authenticated as Admin and access the Admin API's, create a new header named 'ADMIN_AUTH' and set its value equal to the value of 'ADMIN_AUTH_KEY' in .flaskenv file

If Using Postman, do the same :

Screenshot (16)

auctionize's People

Contributors

codeansh avatar

Watchers

 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.