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
1
vote
1 answer

Loopback used a reference to a model in another

I work on an application link to a MySQL DB. I have different models, and i want to used a model in another model.js. for example i have 2 models : Server.json { "name": "server", "base": "PersistedModel", "idInjection": false, …
LoiKos
  • 11
  • 2
1
vote
1 answer

How do I return related models over RESTful API using loopbackjs?

I am evaluating loopback as the API server for a new project. I need to return data in a format specific to Ember and I need to return either: an array of IDs to related models, or an embedded array of the related models objects. I have experimented…
Mark Lummus
  • 740
  • 8
  • 17
1
vote
1 answer

How to verify an foreign key in Strongloop?

I have a list of categories and a list of places, each place has an categorieId in foreign key. categorie.json: http://pastebin.com/ttumKPf9 place.json: http://pastebin.com/J4bdEiUx I try to verify if the category id exists. For this, i redefine a…
1
vote
1 answer

Loopback create a database structure building the json models too

I have a written specification for a sizable database that will be hosted in postgresql and used as a datasource for a backloop nodejs api implementation. The problem is the specification is written in no way parsable by a machine directly so i will…
Evan
  • 1,683
  • 7
  • 35
  • 65
1
vote
1 answer

How to get hold of Response Object in StrongLoop(LoopBack)

I need to log the request Parameters that comes to LoopBack Server and Log Response Parameters that goes out of LoopBack Server. Currently , I am able to log and get request information for remote hooks but unable to fetch response information,…
Varun Jaiswal
  • 57
  • 3
  • 5
1
vote
0 answers

Is it possible to have to multiple models with same name in the same loopback app?

I want to have 2 models with same name (Account in this case) in the same LoopBack app but mounted at different points: For example: http://localhost:3000/api1/Accounts and http://localhost:3000/api2/Accounts ? Is it possible to do this? I tried…
SubuKris
  • 71
  • 2
1
vote
3 answers

StrongLoop: Update currentUser without putting the password?

Setting: Strongloop / loopback: ^2.10.2 AngularJS 1.3 Problem: On the profile page the user model gets updated, but the password should not be transferred (anyway it is hashed and not available.). Approach: So I tried the…
Simon Fakir
  • 1,712
  • 19
  • 20
1
vote
0 answers

Tokens for a microservice architecture

I am trying to figure out the best way to use a token based authentication for my project. I'm using multiple, seperate LoopBack services and I want to use the tokens to grant access to different endpoints. Here's what I'm thinking: The user logs…
atax1c
  • 69
  • 4
1
vote
1 answer

How Can I Return a Random Object in Loopback?

I'm using loopback to build an application, and would like to write a custom remote method which returns a random model instance from the database. Is there a way to do this using the built-in ORM? Thanks!
rdegges
  • 32,786
  • 20
  • 85
  • 109
1
vote
3 answers

Loopback - Include a Relation's Computed Properties

I have a loopback app and I'd like to be able to include computed properties from relations in an API call. For example, say I have an apartment model and an address model. The address has properties city and state. I'd like to make one call, to…
Michael.Lumley
  • 2,345
  • 2
  • 31
  • 53
1
vote
1 answer

StrongLoop loopback - how to exclude results without related model results

I'm using this Node API JSON, which returns Customers, their instances, and the instance versions. Customers.find({ "include": { "relation": "instances", "scope": { "include": { "relation":…
dave-o
  • 47
  • 5
1
vote
1 answer

StrongLoop loopback - REST example using filters on related models?

I found this example to use the Node API to apply filters to related models, but I was wondering if it was possible to achieve the same result using REST? Node Example: Post.find({ include: { relation: 'owner', // include the owner object …
dave-o
  • 47
  • 5
1
vote
1 answer

Loopback IO OAuth not working

I am trying to get a https loopback server up and running protected by OAuth. I am using the loopback gateway sample project as a reference. But for some reason I can't get the OAuth piece to work. What I mean is, even after adding in the OAuth bits…
1
vote
1 answer

Loopback password encryption vis-a-vis rails AES password

We have an existing app which is developed using rails but we are migrating to loopback. One of the issue we are facing is different encryption method for password. We have used AES encryption method whereas loopback uses bcrypt. I have two…
Raj Lalwani
  • 391
  • 1
  • 6
  • 14
1
vote
0 answers

How do I use Loopback's connection pool with Knex query builder?

I'm trying to utilize Knex with the Loopback framework. Currently, Loopback does not provide a good way to create advanced queries. I'm using Knex's query builder, however by default Knex will initialize its own connection pool ON TOP of Loopback's.…
John
  • 93
  • 1
  • 11