Questions tagged [loopbackjs]

LoopBack is an open source Node.js framework built on top of Express 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 JS, iOS & Android SDKs.

The LoopBack framework is a set of 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 , , and . 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.

Source: https://github.com/strongloop/loopback

Documentation: http://docs.strongloop.com/display/LB/LoopBack

Debugging: https://loopback.io/doc/en/lb3/Setting-debug-strings.html

2851 questions
13
votes
2 answers

Loopback passport mobile login

I'm developing an API with loopback and passport. I've seen this example, which is quite good: https://github.com/strongloop/loopback-example-passport In the documentation, they say loopback follows this step to authenticate users via third party…
danielrvt
  • 8,650
  • 14
  • 65
  • 110
13
votes
2 answers

Loopback neq: null

I'm trying a query on a postgres database through the loopback api explorer: {"where": {"archived_at":{ "neq": null }}} However, I only get results where archived_at is null?
Bunker
  • 978
  • 3
  • 10
  • 25
13
votes
4 answers

Sequelize orm vs Loopback orm

I'm creating rest api backed by PostgreSQL. I like Strongloop Loopback framework, it streamlines api development. But how its built-in orm compared to sequelize? What advanced features has sequelize as dedicated sql orm, which are missing in…
rus1
  • 472
  • 5
  • 8
13
votes
2 answers

How Can I Create a Loopback Remote Method with a Model Schema?

I'm currently building a loopback application, which only has a single model named Phone. Here's my common/models/phone.js code: module.exports = function(Phone) { // Return a random phone's data. Phone.random = function(callback) { return…
rdegges
  • 27,994
  • 16
  • 73
  • 100
13
votes
2 answers

How do I get a hold of a Strongloop loopback model?

This is maddening, how do I get a hold of a loopback model so I can programmatically work with it ? I have a Persisted model named "Notification". I can interact with it using the REST explorer. I want to be able to work with it within the server,…
Warren
  • 713
  • 7
  • 18
12
votes
5 answers

How to set custom schema for custom remote methods on Strongloop

I'm newbie on Strongloop and I can't find information for how to customize my response class (model schema for a object I built) and I don't know how to show on the API explorer the object with custom data. For example, I have a custom remote…
jrltt
  • 563
  • 7
  • 19
12
votes
2 answers

Difference between swagger and loopback for Rest API

Swagger helps in creating Restful Api, I get that. Where would you use LoopBack, is this another tool for creating Rest api. LoopBack has support swagger 2.0. I am confused here, can they be used interchangeably.
anivas
  • 6,247
  • 5
  • 34
  • 44
12
votes
3 answers

What does 'cb' mean in loopback?

I am trying to learn loopback but I don't really understand what 'cb' means in function call. I read this In loopback documentation what does variable 'cb' stands for? and I have basic understanding of callback in nodejs but I just don't understand…
Ken Kwok
  • 360
  • 3
  • 19
12
votes
2 answers

Modify image obtained from loopback-component-storage

I am using loopback for storing Image to the server. I want to modify the file name of the file before getting saved to the server. Also I want to convert it to another thumbnail form before getting saved. Here is how I am doing. At client…
Robins Gupta
  • 2,973
  • 3
  • 27
  • 52
12
votes
2 answers

LoopBack Remote Methods and Access to Model Data

I've been working on this for hours and I'm completely lost, because the loopback documentation is not helpful. I'm trying to write application logic into a model. The documentation for that is here. Unfortunately, the example doesn't demonstrate…
Michael.Lumley
  • 2,158
  • 2
  • 27
  • 49
11
votes
1 answer

PayloadTooLargeError on loopback 3

I need to save base64 image in loopback model. When i'm saving base64 image i get an error saying . I have tried updating in middleware same added below, i have done it before in loopback2, for this project i upgraded to loopback3 and got stuck in…
Taj Ahmed
  • 865
  • 12
  • 17
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
  • 10,683
  • 2
  • 33
  • 54
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…
user465342
  • 1,283
  • 11
  • 23
11
votes
1 answer

Using JWT for Loopback authentication

I'm trying to understand how I can fit a custom JWT routing into loopbacks security model. My application has an authentication "dance" involving SMS that results in a valid JWT token using the excellent description. I'm using the jsonwebtoken and…
stwissel
  • 19,390
  • 6
  • 44
  • 90
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,057
  • 2
  • 21
  • 33