Questions tagged [loopback]

Loopback, also known as a loop in telecommunications, refers to the process of feeding back a received signal or data to the original sender using either hardware or software methods.

Personalize the Loopback response following a successful save operation

I'm working on a Loopback 2.x application where I have models for Conversations and Messages, with a relationship of "Conversation has many messages." My goal is to receive a customized JSON response for the POST conversations/:id/messages endpoint, rather ...

I seem to be missing some properties in the request body schema. Why am I receiving an incomplete model for

Seeking assistance in grasping the working of models in loopback4. Here's a model I defined: @model() export class ProductViewConfig extends BaseConfig { @property({ type: 'string', id: true, generated: true, }) _id?: strin ...

What are the steps to incorporate metrics middleware for Socket IO notifications, specifically monitoring both emitted events and listener activity?

I am currently working on a project that involves tracking all socket.io notification transactions initiated by the server, resembling an API request/response counter to validate subscription validation. Our team is utilizing an express middleware to moni ...

What is causing error code 401 to appear when trying to retrieve user items through a query?

When using the StrongLoop API Explorer, I am encountering an issue while trying to query: /People/{id}/food_prefs This query is supposed to return a JSON list of all the food preferences for a Person (User), where the Person is based on the built-in Us ...

Having difficulty with uploading images in the correct size on the AWS S3 server

When I upload an image to AWS S3 bucket, the image size is only showing as 6 Byte, which is not the actual size of the image. I am confused why the image is not uploading with its actual size. What could be causing this issue? interest.js file Inter ...

Converted requests from loopback to angular2 resulted in an error message, as the script's MIME type ('text/html') was determined to be non-executable

Currently, I have set up loopback as the backend API and angular2 as the frontend for my project. Loopback is serving my angular2 frontend without any issues. However, whenever I refresh a page, loopback seems to struggle with handling the URL because tha ...

The Loopback access control list (ACL) for the admin role is failing to be

Seeking assistance with troubleshooting why my 'admin' role is not functioning in loopback 3.x. Here are the codes I am using: script.js - Contains code for creating admin roles in a postgres database. module.exports = function (app) { var User ...

Node generates parallel instances of mysql connections and fails to terminate them afterwards

I am currently working on a project that involves using loopback, node, and MySQL to make parallel database calls. Even though there is already a persistent connection established between node and MySQL, when these parallel calls are executed, new connecti ...

Is there a Node ORM that supports application-side joins?

Initially, I experimented with Loopback and found it to be a useful tool. However, one limitation I encountered is that it does not support relationships across multiple REST data services. Instead, Loopback makes a call to the initial data service and pas ...

An Unexpected ER_BAD_FIELD_ERROR in Loopback 4

I encountered an unusual error: Unhandled error in GET /managers: 500 Error: ER_BAD_FIELD_ERROR: Unknown column 'role_id' in 'field list' at Query.Sequence._packetToError (/Users/xxxx/node_modules/mysql/lib/protocol/sequences/Sequence.js: ...

The npm rebuild process encountered an error because it was unable to locate the Python executable file named "python"

When I run the following command: npm rebuild An error is displayed: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a7d4d3d5c8c9c08a32c5c6d093d2cec1ced21ed7">[email protected]</a> install D:\app\node_ ...

How can I utilize the Json data retrieved through the findById method in my code?

My current project involves creating an API that retrieves data from Patients (id and name), Physicians (id and name), and Appointments (id, phyId, patId, app_date) in order to display the patients scheduled to see a specific physician. To achieve this, I ...

Encountering a 502 (Bad Gateway) error when attempting to execute an operation hook in Loopback 3 with MongoDB

Let me outline the current scenario: At this point, I am dealing with a client application built on Angular 8/Ionic 4 that is making calls to an API (Loopback) using PATCH requests. The core of the issue lies in my approach of listening to the "after sav ...

Tips for creating nested master-detail or master-detail-detail queries in Loopback

My set up includes category and category_subs in a master-detail model, with the post model being linked to category_subs. I have successfully retrieved the master-detail information for both categories, but now I am unsure of how to include the post and e ...

Try using a distinctive error message when sending a request within a Loopback application

In the development of my Loopback 3 application, I have encountered an issue. My application is sending a post request to an external service. Model.prototype.doSomething() = async()=>{ ... let res = await request.post(that service api).sen ...

The reverse proxy in nginx is having trouble accessing custom paths within the loopback network

Running my loopback app on the server and attempting to access it via an nginx reverse proxy has been a challenge. Unfortunately, I'm quite new to nginx and struggling to configure it correctly. Below is a snippet from my config file /etc/nginx/sites- ...

Create custom error messages for loopback instead of using the default ones

I am attempting to customize the default error messages provided by loopback. Here is my approach: server/middleware.json: { "initial:before": { "loopback#favicon": {} }, "initial": { "compression": {}, "cors": { "params": { ...

Updating model names and table names with Loopback and MySQL in Node.js can easily be done by following a few

Utilize Loopback(nodejs) in conjunction with mysql. I am looking to alter the model name and table name to something different. I prefer not to display the table name in the API URL. New table name = 'super_member' New model name = 'member' Updated ap ...