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
0 answers

Loopback and passport - AccessToken 401 Permission denied

I'm trying to see how to use loopback-passport. So I clone this repo: loopback-example-passport and got it working with Facebook and local login. However, if I go to the API explorer and try to GET some users, or my own accessToken, I always get…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
1
vote
0 answers

Alternative for creating Loopback REST Object?

Is there any other way to create an Object for the Loopback repository other than below mentioned way? obj = Repository.createObject(ImmutableMap.of("key","value")); obj.key2 = "value2";
Anthony
  • 3,989
  • 2
  • 30
  • 52
1
vote
1 answer

loopbackjs where clause with expressions using column values

I have a mySQL database table t1 with a bigint field called filter which I need to 'and' to a given query parameter in order to filter out entries. table t1: filter bigint unsigned info varchar(200) As a pure mySQL statement my query would be…
luksch
  • 11,497
  • 6
  • 38
  • 53
1
vote
3 answers

How to get the current User inside a 'before save' operation hook?

loopback.getCurrentContext() is null for me. Why? I need to grab the current User from the context. The operation hook's ctx is not the same context and does not contain what I need as far as I can tell. Customer.observe('before save', function…
user798719
  • 9,619
  • 25
  • 84
  • 123
1
vote
1 answer

Loopback - GET model using custom String ID from MongoDB

I'm developing an API with loopback, everything worked fine until I decided to change the ids of my documents in the database. Now I don't want them to be auto generated. Now that I'm setting the Id myself. I get an "Unknown id" 404, whenever I hit…
danielrvt
  • 10,177
  • 20
  • 80
  • 121
1
vote
0 answers

How do I simulate Strongloop's update method with Supertest/Superagent?

I'm working on some tests for strongloop/loopback APIs using supertest and mocha. One of the standard endpoints is Model/update. Update is actually a form of PersistedModel.updateAll which takes in a query and then posts to all entries that match…
Ben Zifkin
  • 892
  • 2
  • 8
  • 16
1
vote
1 answer

Getting joined data from strongloop/loopback

How can I get data from two joined tables? Suppose, there are two models called Category (CategoryId, CategoryName) and Product(ProductId, ProductName, CategoryId), Is there a way to get a result like:(ProductId, ProductName, CategoryId,…
Anoop Thiruonam
  • 2,567
  • 2
  • 28
  • 48
1
vote
1 answer

Trouble setting up a Loopback production host on AWS EC2

I'm having trouble setting up a StrongLoop LoopBack production host on AWS EC2. I'm following these directions. This is what I tried. I created an EC2 server that's a Ubuntu Server 14.04 LTS. Then I: $ ssh -i ~/mykey.pem ubuntu@[ec2-ip-address] $…
1
vote
1 answer

Cannot connect to StrongLoop PM using StrongLoop Arc

I'm having trouble connecting to StongLoop PM using StrongLoop Arc. I'm following these directions. Here's what I tried: # in one terminal window, I started up StrongLoop PM $ nvm install v0.12.4 $ nvm alias default 0.12.4 $ npm install -g…
user2245766
  • 301
  • 1
  • 10
1
vote
0 answers

android with loopback: confusion about sending notifications to devices

I am using strongloop's loopback as server part, and I am writing two android apps, one for clients and one for shop owners. When an order comes in, a notification should be sent to the shop owner's device. So far, I learnt: I need to register to…
transient_loop
  • 5,984
  • 15
  • 58
  • 117
1
vote
1 answer

Loopback 'err' Object

I am using a loopback remote method to parse data that I get from a REST endpoint . I am trying to understand the 'err' object that is passed to the callback . The second parameter is the response object - whatever I get from the response and the…
Mayur Arora
  • 447
  • 5
  • 11
1
vote
2 answers

StrongLoop's LoopBack.io: How to turn on HTTP access log?

I searched the docs, but found no answer. What is the preferred way of turning on access logging? I expect HTTP verb, requested path, source IP address,... printed to either standard output or a log file. All I got so far is: Browse your REST API at…
ideaboxer
  • 3,863
  • 8
  • 43
  • 62
1
vote
2 answers

Strongloop/loopback: how to disable authentication for User model over REST?

I have typed in at the commandline: slc loopback:acl and disabled all security for the User model. Going into strongloop explorer, doing a simple GET Users request gives me a 401 authorization required error. Any ideas how to open up the User…
user798719
  • 9,619
  • 25
  • 84
  • 123
1
vote
1 answer

CRUD with external REST service as Model in Loopback

A couple quick questions: I would like to use an external REST API service (e.g. AgileCRM). With their service, I would like to use the REST Connector within a model that allows me to CRUD AgileCRM's API. Is this possible? If so, what model should…
1
vote
1 answer

Using Wallaby with LoopbackJS

I'm trying to use Wallaby with LoopbackJS and last couple of hours brought only failures. Maybe someone here already figured out how to do it. Here is my wallaby config that is closest to "it's working" module.exports = function () { return…
Paweł Wszoła
  • 1,096
  • 1
  • 9
  • 21