Questions tagged [loopback4]

Questions about LoopBack version 4. Use this tag for LoopBack questions which are specific to only version 4. General LoopBack questions should be tagged with loopbackjs.

Create powerful APIs easily with a new creation experience for defining REST APIs and handling API requests/responses.

A new, improved programming model with dependency injection and new concepts such as components, mixins, repositories, etc. make this the most extensible version yet.

See also

483 questions
0
votes
2 answers

How can I use a property in a model in Loopback 4 (strongloop) and hide it in the /explorer (Ej: Autogenerated ID)

I have this model done in loopback 4: @property({ type: 'string', id: true, default: () => uuid(), }) id: string; @property({ type: 'string', required: true, }) name: string; As you see, the id is generated by…
Jota
  • 81
  • 7
0
votes
2 answers

Loopback 4 - How to intercept find method of every controller or model

Requirement is that for each get request I need to send all the objects in that table. For e.g. I make a request to get all clients (maybe with some filters) with certain limit for pagination purposes and in the response I want the result as array…
user3170450
  • 375
  • 3
  • 20
0
votes
0 answers

How To Create a User in MonogoDB Database using loopback4

I would like to know, How to create a user inside a MongoDB database (which was dynamically created) and assign a role (eg: userAdmin) to it, using loopback4
0
votes
1 answer

Inject a repository into model class?

i am using the Loopback4 framework. I try to inject a repository into some model class (documentRepository into userModelClass). I am not sure if it is possible to do something like that. The reason why i want to do this is because in the repository…
nikVer
  • 1
0
votes
1 answer

Authentication through Loopback4

I have an API eg. http://www.myportal.com/login and when we call this URL it asks for username and password and after successful login, it returns an access token. Same thing I have to implement in Loopback4 by calling the above URL. Please give…
0
votes
0 answers

Update embedded models in Loopback 4

I have the following model relationship in my LoopBack 4 application: A Survey has 1-many relationship with Question, Question has 1-many relationship with Option. Am using MongoDB as the database. I am unable to figure out how to implement a…
naveenkumashi
  • 91
  • 1
  • 4
0
votes
1 answer

How can I add instantiate a global object and attach it to every request on loopback 4?

I am using loopback 4 and I want to create an object instance when the server starts and share it in the methods of all controllers. How can I achieve that? Thanks
Juan Pablo Fernandez
  • 2,408
  • 3
  • 18
  • 32
0
votes
2 answers

Loopback4 - How to connect MongoDB

I'm trying to connect mongodb and mysql on Loopback4 How to config datasource.json and model as Content's model conecter mongoDB, User's model conecter mysql
-1
votes
1 answer

Implementing socket.io in loopBack 4

I have tried socket.io in node JS and it works fine. When I tried to integrate socket.io in loopback 4 it is not working as expected. I surfed the problem in google as well as in the lb4 documentation but I did not found any solutions. I tried with…
-1
votes
1 answer

Create an excel sheet from a loopback api's response

Is there any ways to create an excel sheet from the response of a loopback API? Here is the sample response body { "status": "OK", "testSuite": { "name": "testsuite2", "id": 8, "userId": 3 }, "testCase": [ { "id": 15, …
veenaMSL
  • 101
  • 1
  • 9
-1
votes
1 answer

RequestBody.file did not receive any file

So I've been using LoopbackJS for the past 2-3 months and I'm currently building a file uploader (specifically for profile avatar image). But every time I sent an image file to the endpoint it never received by the server and tagged it as…
MEGAtive
  • 3
  • 3
-1
votes
1 answer

How connect only localhost to MySQL in Loopback 4?

I can't connect to MySQL database via 127.0.0.1. My provider says could connect via localhost. In mysql.datasource.config.json writed localhost, but loopback try connect to 127.0.0.1. How connect only to localhost? Version loopback: 4
-1
votes
2 answers

loopback4 Regular Expressions- Match Anything

I use loopback4. How do I make an expression to match datetime with time zone.I am interested by the hour parameter only: "finalhour" example: 2019-12-20T10:22:50.143Z ==> 2019-12-20Tfinalhour:22:50.143Z I tried with this: const pattern=await…
H_Hmd
  • 25
  • 8
-2
votes
1 answer

What is the difference between eslint and vscode for creating an application in loopback4?

What is the difference between eslint and vscode for creating a new application in loopback4 , while using the command lb4 app, and wherever we can use it?
bimmi
  • 11
  • 2
-2
votes
1 answer

How to perform pdf report generation in loopback4

Is PDF report generation is possible in Loppback4?? Is there any code for the PDF report generation in Loopback4??
1 2 3
32
33