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
11
votes
3 answers

Update node to v12 on ubuntu

I want to update my node to version greater than v10 but i still get v9.11.2. I tried this commands curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs and i am still on v9.11.2 i also remove and reinstall…
gildas kevin
  • 161
  • 1
  • 1
  • 8
11
votes
3 answers

Implement change password with Loopback

I am trying to implement the change password feature with Loopback's built-in method, It works fine, but it doesn't update the password with hash instead it just saves a plain text in the db. I am using loopback-component-passport npm package in…
Vicky Gonsalves
  • 11,593
  • 2
  • 37
  • 58
11
votes
2 answers

Loopback testing with supertest, mocha and models

On the Google groups post on deprecating loopback-testing there is a question that asks about providing a proper example of how testing can be achieved without loopback-testing. That thread talks about using supertest instead. Below is an attempt…
Dakotah North
  • 1,324
  • 12
  • 29
11
votes
3 answers

Strongloop: how do you return an error if Operation Hook fails?

How do you return an error inside an operation hook? Use case is sending a push notification after saving a new model instance. I observe the 'after save' event, send the push. If this fails for whatever reason, I want to send a 500 response code.…
user798719
  • 9,619
  • 25
  • 84
  • 123
11
votes
1 answer

Downloading file from Strongloop loopback

I have a model in the loopback API and I want to download it as a file rather than display it as text. I had some old PHP code that I have bastardized adapted to try and download the response as a file. This is my code: Issue.afterRemote('getCSV',…
Stev_k
  • 2,118
  • 3
  • 22
  • 36
11
votes
5 answers

Loopback model CURRENT_TIMESTAMP

I have a model like this - { "name": "MakeCallTestConfiguration", "base": "PersistedModel", "idInjection": true, "properties": { "id": { "type": "number", "id": true, "generated": true }, "destination": { …
Jahid Shohel
  • 1,395
  • 4
  • 18
  • 34
11
votes
7 answers

How do I return specific http status codes from a remote method in loopback?

I would like to know if there is a way to returns a specific HTTP status code from within a remote method. I can see that there is a callback function which we can pass an error object, but how do we define the HTTP status code?
ppoliani
  • 4,792
  • 3
  • 34
  • 62
11
votes
2 answers

How to set up the ACL to allow everyone list all the Users from the REST API

Im trying to list all the Users in my loopback 2.0 app using the REST API and I'm getting the following error: { "error": { "name": "Error", "status": 401, "message": "Authorization Required", "statusCode": 401, "stack":…
jpcapdevila
  • 207
  • 3
  • 8
11
votes
1 answer

Login by facebook in angular app with loopback backend

I'm making an angular application with strongloop loopback backend. Also I integrating a third party login by facebook using loopback-passport module. everything was fine in loopback-example-passport and everything is fine in my app right before the…
chilicoder
  • 279
  • 3
  • 17
10
votes
2 answers

How to specify environment variables in loopback 4?

I found documentation for the previous version https://loopback.io/doc/en/lb3/Environment-specific-configuration.html but I can't find a documentation for the version 4 There's something I'm missing or v4 doesn't yet support environment specific…
Edo
  • 1,539
  • 18
  • 26
10
votes
4 answers

How to automigrate in Loopback

I have renamed a number of models and tables in my loopback application, however I must now migrate to this model definition. I need to run autoMigrate(). It must be run on a dataSource object but the documentation provides no help regarding…
JD.
  • 2,361
  • 6
  • 25
  • 38
10
votes
2 answers

Strongloop app does not load local datasource

I want to use different environment specific datasource configurations in a Strongloop app. I saw at https://docs.strongloop.com/display/public/LB/Environment-specific+configuration that the priority of configurations are: Environment-specific…
Sanandrea
  • 2,112
  • 1
  • 27
  • 45
10
votes
2 answers

Port timeout deploying Loopback app to Heroku

I deployed an Loopback app to Heroku, but it keeps crashing with error Web process failed to bind to $PORT within 60 seconds of launch I know it could be connected to the dynamic port of Heroku, so I set my port to the process environment one…
pasine
  • 11,311
  • 10
  • 49
  • 81
10
votes
1 answer

Loopback: Embedded Model is not working in offline sync

I have followed the loopback offline sync example and create my own model with embedded document. I created a Model named Project where ProjectMembers are embedded model. Here are my model: Project.json { "name": "Project", "base":…
fyasir
  • 2,924
  • 2
  • 23
  • 36
10
votes
3 answers

Loopback MongoDB String Property Converted to ObjectId When Using Find Where Clause

I have a model with a number of properties. One of those is a field named "developerId" that contains a string which has the same length and characteristics as a MongoDB ObjectId (it is in fact a stringified ObjectId). When I query the model with…
Rob Evans
  • 6,750
  • 4
  • 39
  • 56