1.0.7 • Published 4 years ago

@les-roberts/api_gateway_generator v1.0.7

Weekly downloads
8
License
MIT
Repository
-
Last release
4 years ago

Initialise your project and add some routes

This is a simple cli to generate your project and generating your routes to perfectly communicate with the api-gateway

Installation

First install the dependencie

$ npm i -g @les-roberts/api_gateway_generator

Install all dependencies

$ npm i

Usage

$ api_gateway_generator <command>

First generate the project with :

$ api_gateway_generator init

√ Enter server port · 5000

Loaded templates: PATH_TO_NODE_MODULE\@les-roberts\api_gateway_generator\_templates
      added: src/config/routerConfig.ts
      added: src/main.ts
      added: package.json
      added: src/config/serverConfig.ts
      added: tsconfig.json

And then to generate your route :

$ api_gateway_generator route

√ Enter the name of the Route you want to create · user
√ Type host (you can add more later in routerConfig.ts) · http://localhost:3009
√ What strategy do you want to use ? · round-robin

Loaded templates: PATH_TO_NODE_MODULE\@les-roberts\api_gateway_generator\_templates
      inject: src/config/routerConfig.ts

You can launch your app with :

$ npm run start

> lesrobertsframework@1.0.0 start PATH_TO_PROJECT/PROJECT
> ts-node src/main.ts

App listenning on port : 8000
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago