Questions tagged [loopbackjs]

LoopBack is an open source Node.js framework built on top of Express.js optimized for mobile, web, and other devices. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, build REST APIs and connect using JavaScript, iOS, and Android SDKs.

The LoopBack framework is a set of Node.js modules that you can use independently or together. An application interacts with data sources through the LoopBack model API, available locally within Node.js, remotely over REST, and via native client APIs for iOS, Android, and HTML5.

Using these APIs, apps can query databases, store data, upload files, send emails, create push notifications, register users, and perform other actions provided by data sources and services. Clients can call LoopBack APIs directly using Strong Remoting, a pluggable transport layer that enables you to provide backend APIs over REST, WebSockets, and other transports.

See also

2853 questions
0
votes
0 answers

loopback 4 interceptor with metadata Similar to authorize

I want to restrict API access with an access-key how most of the APIs provide read access to anonymous users. In my use case my frontend isn't guarded with JWT or any token. I won't to prevent any random person post to my API. I want to give my…
0
votes
1 answer

how to change the response of api in loopback, how to change in js file corresponding to a json model

I have a model, using postman I am sending request to this model, and in response I am getting the complete record(suppose 25 columns I have), so in response I am getting 25 columns back. I want to see only one column in the response, how can I…
hakuna
  • 3
  • 3
0
votes
0 answers

Node 14 Loopback Routes 404 not found

i have a node app that was previously working on version 10, now its working on version 14. I have just run npm update. I keep gettig this error when i start my server. Unhandled error for request POST /hl7_message: Error: Cannot POST /hl7_message …
CKW
  • 51
  • 5
0
votes
0 answers

Setting a foreign key as a nullable key in model file is not working in loopback 4

Describe the bug I want to set up a field that is defined as a foreign key, but also supports the ability to be null. In the model file, I have this already @belongsTo(() => Bill, { keyTo: 'BillID', name: 'Bill' }) BillID: Number; But what I…
omega
  • 40,311
  • 81
  • 251
  • 474
0
votes
1 answer

Loopback-next ReferenceMany Unable to find _id

I have user Model, which reference to ListedStocks, @referencesMany( () => ListedStocks, {}, { mongodb: {dataType: 'ObjectId'}, }, ) stockIds?: string[]; But when i try to Create a user and pass an Array of Stocks _id, it…
0
votes
1 answer

Trying to add dependency json schema using loopback mongodb

I wanted a dependency schema using mongodb loopback. My Post requests: REQUEST TYPE 1 { “url”: “google.com” “type”: “redirect” } REQUEST TYPE 2 { “url”: “yahoo.com” “type”: “anchor” } My model function looks like @property({ …
0
votes
1 answer

Loopback 3 updating model properties ensure old data is converted correctly without data loss

So I am using Loopback 3 atm, and I am currently updating the properties of my model. Problem is that the structure will be different as before as certain properties are now split into 2 separate properties, thus if I would place it online that data…
Billy Cottrell
  • 443
  • 5
  • 20
0
votes
0 answers

where condition in loopback 4 with column of other models

I have a query made through the filter on multiple models in cascade. I would like to use a column of the first level (ModelA) in the where conditions of the underlying levels, is it possible? example: const customFilter = { include:[{ …
legolas82
  • 13
  • 1
0
votes
1 answer

loopback 4 : patch request blocked by CORS policy

I get an error when I send a patch request to my api (with loopback 4) , all the other request are working fine , i get error only on patch request . error : Access to XMLHttpRequest at 'url api' from origin 'url web app' has been blocked by CORS…
0
votes
1 answer

How to remove all frontend files from Loopback app

While developing on a loopback api it is very convenient that the default lp4 app command generates a simple landing page with a swagger api explorer. But I don't want this when I am finished. where in the code do I disable the self hosted pages,…
Jeppe
  • 1,424
  • 2
  • 15
  • 36
0
votes
1 answer

Where & Count cant be implemented together in Loopback 4

I am implementing an API that can take out all the data where user_id: user_id but it is not working please help me to implement the same. here is my code of Follow_api controller: @get('/follow-masters/count/{id}') @response(200, { …
0
votes
1 answer

Loopback 4 - Is it possible to define id property's length?

Using LB4 + MySQL DB through loopback-connector-mysql to create tables on DB. A {id: string, name: string} id names 0007bc40-814b-11ec-8128-4df48bd1ae4d John 0007bc40-814b-11ec-8128-4df48bd1ae3d Marie B {id: string, aId:string, name:…
0
votes
1 answer

What is the maximum records returned by Lookback 4 regardless of limit clause value?

In loopback 4, I know we can limit records like this ?filter={"limit":10} but what is the biggest value I can set as limit? Also is there a value I can put there which is the same thing as getting all records? Things like 0 or -1 don't work.
omega
  • 40,311
  • 81
  • 251
  • 474
0
votes
1 answer

How to get postgres query created by Loopback 4 before it hits database?

I want to sort based on the nested property of Loopback 4. I can't find any direct way in Loopback 4 for…
user2869736
  • 133
  • 9
0
votes
1 answer

How to get users having birthday today in loopback?

I need to send birthday wishes to users in my application. I have a table "userdetails" with the column "dob". I need a query to retrieve users having a date of birth matching today's date. For example, if a user has a "dob" value "1991-01-21…
1 2 3
99
100