Git Product home page Git Product logo

worker-api's Introduction

Worker-API

This application is generated using LoopBack 4 CLI

Install dependencies

By default, dependencies were installed when this application was generated. Whenever dependencies in package.json are changed, run the following command:

npm install

To only install resolved dependencies in package-lock.json:

npm ci

Run the application

npm start

You can also run node . to skip the build step.

Open http://127.0.0.1:3000 in your browser.

Rebuild the project

To incrementally build the project:

npm run build

To force a full build by cleaning up cached artifacts:

npm run rebuild

Fix code style and formatting issues

npm run lint

To automatically fix such issues:

npm run lint:fix

Other useful commands

  • npm run migrate: Migrate database schemas for models
  • npm run openapi-spec: Generate OpenAPI spec into a file
  • npm run docker:build: Build a Docker image for this application
  • npm run docker:run: Run this application inside a Docker container

Deployment

Prerequisites

To deploy you need to have installed:

Deploy k8s with k3d

Execute the following command:

k3d cluster create --config deployment/k3d.yaml

Create Namespaces and set default namespace

Execute the following command:

kubectl apply -f deployment/manifest.yaml
kubectl config set-context --current --namespace=dev

Deploy configmaps and secrets

Execute the following command:

kubectl apply -f deployment/configmaps.yaml
kubectl apply -f deployment/mysql-secret.yaml

Deploy MySQL volumes and deployment

Execute the following command:

kubectl apply -f deployment/mysql-pv.yaml
kubectl apply -f deployment/mysql-deployment.yaml

Deploy the Worker-API with service and ingress

Execute the following command:

kubectl apply -f deployment/worker-api-deployment.yaml

Test Application

Main Page for WorkerAPI http://10.26.32.11/

MainPage

Swagger http://10.26.32.11/explorer/

Swagger

Execute POST

body example

{
  "name": "Frank",
  "lastname": "Flores",
  "role": "DEVOPS"
}

POST

Execute GET

body example

{
  "offset": 0,
  "limit": 100,
  "skip": 0,
  "order": "name",
  "fields": {
    "id": true,
    "name": true,
    "lastname": true,
    "role": true
  }
}

GET

worker-api's People

Contributors

frankdflores avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.