toenvoy
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Swagger to Envoy

Simple cli tool to convert swagger definition to envoy edge proxy using Nodejs and oclif framework and a shell script to creat and run a docker continer

oclif Version License JavaScript Style Guide Downloads/week

Pre-requisite

  • node.js
  • Docker

Installation

You can install toenvoy either through npm or by cloning the code from this GitHub repo. This README covers the installation steps with npm.

Setup

  1. Run the following command in the terminal
$ npm install -g toenvoy

Runnig the Cli-Tool

Metord 1)

  1. Navigate to the location where the swagger file is located Make Sure the swagger file is named as swagger.yaml
  2. Run the command 'toenvoy' This will create a directory called envoy-proxy in the current directory.

Methord 2)

  1. Navigate to the location where the swagger/OAS definition is located

  2. Run the command 'toenvoy -n=${filename.yaml}' This will create a directory called envoy-proxy in the current directory.

Buiding and Runnig the Docker Container

  1. Once the envoy-proxy directory is genarated navigate in to the folder
  2. Make run.sh file executable
  3. Run the file run.sh

This will create an Docker container which runs on port :10000

Command reference and examples

toenvoy

Generates Envoy Proxy bundle in the folder calle envoy-proxy from Swagger specification file named as swagger.yaml.

Example

Methord 1)

$ toenvoy
cd envoy-proxy
$ chmod 777 run.sh
$ ./run.sh

Methord 2)

$ toenvoy -n=myfile.yaml
cd envoy-proxy
$ chmod 777 run.sh
$ ./run.sh

Credits - oclif framework https://oclif.io

Readme

Keywords

Package Sidebar

Install

npm i toenvoy

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

14.4 kB

Total Files

10

Last publish

Collaborators

  • vimukthi96