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
6
votes
2 answers

How to order by included model property in LoopBack JS

I have a person model which has a belongsTo relations with a meeting model. I´m doing the query Person.find({include:['meetings']}) Which gives me a result like this one: person:{ name:"person 1", age: 15 meeting:{ …
Pablo Estrada
  • 3,182
  • 4
  • 30
  • 74
6
votes
1 answer

loopback mongodb Authentication failed

I have an empty loopback app, where I added a model and a mongodb datasource. When connecting, I get the following error: Web server listening at: http://0.0.0.0:3000 Browse your REST API at http://0.0.0.0:3000/explorer Connection fails: {…
Alexander
  • 310
  • 2
  • 13
6
votes
1 answer

CORS preflight error redux & loopback API

I have a client application on react-redux & API app on loopback. For my local testing I am running client app on port 8080 and server app on port 3000. When I try to test out the Google OAuth (using loopback-passport component) with the client app,…
anoop
  • 3,229
  • 23
  • 35
6
votes
3 answers

How to deploy Loopback ? Need simple explanation

I have developed a Loopback API and would like to deploy it to a test instance (Heroku or Digital Ocean, probably). It is quite complicated to understand how to deploy it. There seems to be many solutions out there, from StrongLoop Process Manager…
kartsims
  • 1,001
  • 9
  • 16
6
votes
1 answer

Why is node require cache filling up and leaking

Im stress testing an API in loopback which is transpiled with Babel. However, during these longer "smoke" tests, we have seen the require cache in Heap analysis growing quite large (up to 1gb) and does not get GCd. I understand the require cache…
wprater
  • 1,022
  • 11
  • 21
6
votes
2 answers

Setting access token cookie in Loopback?

I want to use cookies to keep a user logged in. On this page here they say To use cookies for authentication, add the following to server.js (before boot): app.use(loopback.token({ model: app.models.accessToken })); Seemed simple enough. I…
Kenmore
  • 1,525
  • 3
  • 16
  • 39
6
votes
1 answer

LoopBack "group by" ability with mySQL?

I'm new to LoopBack, and I seem to be missing something. I've heard so much about StrongLoop and LoopBack, I find it hard to believe this doesn't exist. My case: I'm looking to count the amount of events with each different severity. A table for…
Finkel
  • 283
  • 1
  • 3
  • 18
6
votes
1 answer

Strongloop EmbedsMany helper methods not found

Some questions that I can't find the answer to in the documentation. I'm trying to get a structure like this: Node: id: '1sdf12asd123', name: 'node1', history: [ ts: 234234234234, data: { 'foo': 'bar' } ], …
TrySpace
  • 2,233
  • 8
  • 35
  • 62
6
votes
3 answers

loopback relational database hasManyThrough pivot table

I seem to be stuck on a classic ORM issue and don't know really how to handle it, so at this point any help is welcome. Is there a way to get the pivot table on a hasManyThrough query? Better yet, apply some filter or sort to it. A typical…
mbouclas
  • 634
  • 1
  • 12
  • 30
6
votes
1 answer

Use of the Application model in Loopback

In a Loopback application, there's mention of a built-in Application model. This page says "contains metadata for a client application that has its own identity and associated configuration with the LoopBack server." When clicking through the…
Ben
  • 20,737
  • 12
  • 71
  • 115
6
votes
4 answers

loopback save related hasmany models in single request

I have two models that are related through a hasMany relationship. Customer hasMany CustomerPhones When creating a new Customer, I would like to pass the related CustomerPhones as part a single request. This seems like a common need, if the approach…
6
votes
2 answers

How to programmatically detach a model from a loopback application?

I am using loopback without the strongloop framework itself, meaning I have no access to any of the cli tools. I am able to succesfully create and launch a loopback server and define/load some models in this fashion: var loopback =…
6
votes
3 answers

How to upload file using loopback api explorer?

I'm using loopback Api Explorer I need to upload a file by explore how can I upload that because I don't find any option to upload file please refer the screenshot .
Sparsh Pipley
  • 451
  • 8
  • 22
6
votes
1 answer

JS Object strange behaviour when trying access Loopback related model query

I am working with the Loopback Framework, doing a web project. But I think that the question that I am exposing here has less to do with this, but with general Javascript / Node.JS knowledge. At one part of the code, I am doing: roleMapping.find({ …
Dark_eye
  • 415
  • 7
  • 15
6
votes
1 answer

What's the difference between embedsMany and hasMany in Strongloop loopback

At first sight they seem to do the same thing: define a one-to-many relation So why would you choose one or another?
Ernie
  • 972
  • 1
  • 10
  • 23