Giter VIP home page Giter VIP logo

jaouherk / proxy-gateway Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 2.0 2.14 MB

Simple Gateway for microservices built with Typescript/ExpressJs featuring dynamic manageable routes. Can also be used as a mocker.

Home Page: https://jaouherk.github.io/proxy-gateway/

License: MIT License

TypeScript 99.76% JavaScript 0.03% Dockerfile 0.20%
api-gateway expressjs endpoints proxy microservice javascript typescript proxy-gateway mocker-api

proxy-gateway's Introduction

A Microservices API Gateway Built Using Typescript (test)

v0.2.0

Proxy Gateway is an API gateway that hovers over microservices or serverless architecture. It is completely dissociated from the stack used for the other services. It secures and exposes your services with a complete control over all its functionality and behaviour.

This can be extended by creating or adding express middlewares.

This repository exposes an API interface to manage these routs. A frontend interface (initially in angular) will help you manage your gateway. Being built as a library will help you integrate it easily within any js interface.


Main Features

  • Proxy gateway for APIs of Microservices and Serverless architecture
  • Interface to create mocks for the expected routes (Very handy for developers)
  • Full control to the level of the methods used
  • Developed with Express and Typescript
  • API interface to manage it
  • Integrates with frontend library
  • Processes authenticated and public
  • Included a Postman collection to start testing your API interface
  • Output logs ready for easy parsing by logstash or Splunk
  • Logging for major requests and incidents with levels of seriousness
  • Logging uses tags to easily be fetched through logs grabber

Installation

After having installed Node globally, execute the following command:

$ git clone [email protected]:JaouherK/proxy-gateway.git
$ cd proxy-gateway
$ npm install

Configuration

In your db server currently only mysql (but easily changes to any of the following: mariadb,sqlite,postgres,mssql) and create a database like gateway.

Open the config file within src folder and update the needed values

const defaultConfig = {
    port: 3232,  //the port that will be used to expose the app
    jsonLimit: '20mb',
    dialect:"mysql",
    host: "localhost",
    database: "gateway",
    username: "root",
    password: "password",
};

Ignition

Solution 1 - Using Docker compose

Execute the following command to start the docker container:

$ docker-compose up

This compose will start also a mysql container

Solution 2 - Starting the node server locally

Execute the following command to start the server:

$ yarn build
$ yarn start

For development purposes you can use this nodemon ignition

$ yarn start:watch

this will initialize the database and its tables if not exist. It will also expose initially the Manager and health check routes. Use the Postman collection to start creating your routing system.


Contribution

All contributions welcome! Please see the contributor's guide& code of conduct

Report security issue

Please check security

License

MIT License

proxy-gateway's People

Contributors

dependabot[bot] avatar jaouherk avatar sayedcsekuet avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

proxy-gateway's Issues

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.