@les-roberts/api_gateway_generator
This is a simple cli to generate your project and generating your routes to perfectly communicate with the api-gateway
Last updated 3 months ago by brxlik .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @les-roberts/api_gateway_generator 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.7                                ...           latest (3 months ago)

7 Versions

  • 1.0.7                                ...           3 months ago
  • 1.0.6                                ...           3 months ago
  • 1.0.5                                ...           3 months ago
  • 1.0.4                                ...           3 months ago
  • 1.0.3                                ...           3 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 7
Last Month 7
Dependencies (5)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |