Skip to the content.

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


Installation

After having installed Node globally, execute the following command:

$ git clone git@github.com: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