This application is generated using LoopBack 4 CLI
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
npm start
You can also run node .
to skip the build step.
Open http://127.0.0.1:3000 in your browser.
To incrementally build the project:
npm run build
To force a full build by cleaning up cached artifacts:
npm run rebuild
npm run lint
To automatically fix such issues:
npm run lint:fix
npm run migrate
: Migrate database schemas for modelsnpm run openapi-spec
: Generate OpenAPI spec into a filenpm run docker:build
: Build a Docker image for this applicationnpm run docker:run
: Run this application inside a Docker container
To deploy you need to have installed:
Execute the following command:
k3d cluster create --config deployment/k3d.yaml
Execute the following command:
kubectl apply -f deployment/manifest.yaml
kubectl config set-context --current --namespace=dev
Execute the following command:
kubectl apply -f deployment/configmaps.yaml
kubectl apply -f deployment/mysql-secret.yaml
Execute the following command:
kubectl apply -f deployment/mysql-pv.yaml
kubectl apply -f deployment/mysql-deployment.yaml
Execute the following command:
kubectl apply -f deployment/worker-api-deployment.yaml
Main Page for WorkerAPI http://10.26.32.11/
Swagger http://10.26.32.11/explorer/
Execute POST
body example
{
"name": "Frank",
"lastname": "Flores",
"role": "DEVOPS"
}
Execute GET
body example
{
"offset": 0,
"limit": 100,
"skip": 0,
"order": "name",
"fields": {
"id": true,
"name": true,
"lastname": true,
"role": true
}
}