1.0.19 • Published 2 years ago

lesscode-api v1.0.19

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Overview

CLI (Command line interface) for auto generating lesscode-code skeletal api service.

Usage

1. Install

Install the lesscode-api cli globally...

yarn

yarn global add lesscdoe-api

npm

npm install -g lesscode-api

Create a new Micro-Service

To create a new micro-service, go to the dir where you want to create the micro service and type

lesscode-api <api-name> <path> <port>

Where :

api-name : Name of the api, e.g. - api-company, api-inventory etc,

path : API path, e.g. - /api/v3/company

port : API port, e.g. - 8092

Run & Test

1. Update .env file

Change to the Micro-service directory, which just got created & update the .env file with the right AWS credentials.

AWS_ACCESS_KEY_ID=<your access key id> 
AWS_SECRET_ACCESS_KEY=<your secret access key>

2. Install the packages

Yarn

yarn install

NPM

npm install

3. Run the micro-service

node .

4. Test the health-check

http://localhost:<port>/<path>/health

Under the hood

The following directories / files are created when you create a new micro-service

lesscode-dir.png

rest : contain the api.yaml, where you define your contract in open-api (3.0) format. lesscode-gateway atuomatically maps the endpoints (path) to the functions. src : contain all the functions. test : contain all the test files - unit, functional & performace. .circleci CI/CD yaml. Currenly we support circleci.

1.0.19

2 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago