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

MongoDB aggregation on Loopback

How do I obtain the sum of a Loopback PersistedModel? There does not seem to be a documentation on how to achieve that. If possible I would like to avoid having to find all the rows and sum it in Node.js. UPDATE Trying out the example from…
uzyn
  • 6,625
  • 5
  • 22
  • 41
6
votes
2 answers

loopback connector for ElasticSearch

There are at least two different packages available on npm, loopback-connector-elastic-search and loopback-connector-es. I have not been able to connect my very basic Loopback api to my ES instance, and the sparse documentation on these two…
punkish
  • 13,598
  • 26
  • 66
  • 101
6
votes
2 answers

Strongloop with Emberjs

Ember Data's REST Adapter accepts the JSON from the server in this format: Taken from the documentation: http://guides.emberjs.com/v1.10.0/models/the-rest-adapter/ { "post": { "id": 1, "title": "Node is not omakase", "comments": [1, 2,…
user3568719
  • 1,036
  • 15
  • 33
6
votes
1 answer

Loopback Multitenancy Database Swap

I'd like to implement multitenancy in my loopback app. Right now, I'm trying to use middleware to redefine my datasources to point to different databases on my mongodb server for each request, based on the domain the request. The code runs, but it…
ishmandoo
  • 413
  • 5
  • 10
6
votes
1 answer

Loopback - Easiest way to extend a built-in model

I've been using Loopback to create an API. The documentation is generally really good but doesn't really answer my question about the following: how do I extend (not replace) a built in model? The most promising piece of information came from this…
Tom Hallam
  • 1,924
  • 16
  • 24
6
votes
5 answers

How can I get the slc command to work on Ubuntu?

I have installed Strongloop using npm install -g strongloop on my Ubuntu 14.04 server. The slc command does not work. It says The program 'slc' is currently not installed. You can install it by typing: sudo apt-get install heimdal-multidev How can…
Antrikshy
  • 2,918
  • 4
  • 31
  • 65
6
votes
3 answers

How to call model.find method synchronously in node / loopback?

I am using a custom model and trying to filter it in a loop using find method. e.g. given below for i = 0 to n { var u = User.find( where { name: 'john'}); } It doesn't work. Also, if I use the following for i = 0 to n { User.find( where { name:…
Raj Lalwani
  • 391
  • 1
  • 6
  • 14
6
votes
3 answers

How to change http status codes in Strongloop Loopback

I am trying to modify the http status code of create. POST /api/users { "lastname": "wqe", "firstname": "qwe", } Returns 200 instead of 201 I can do something like that for errors: var err = new Error(); err.statusCode = 406; return…
enguerran
  • 305
  • 4
  • 9
6
votes
2 answers

Loopback relationship on non id field

I want to specify the relationship betweet 2 mssql tables. Paymentcategory and Payout. paymentcategory.id joins on the payout.category column. in payout.json model I specified as foreignKey: id, "relations": { "paymentcategories": { …
blockwork
  • 185
  • 1
  • 10
6
votes
1 answer

Making Loopback API Ember.js compatible

I'm trying out Loopback for an API that will talk to Ember. Ember requires JSON to be contained in 'keys', e.g. for an account: { account: { domain: 'domain.com', subdomain: 'test', title: 'test.domain.com', id: 1 } } I've found…
Adamski
  • 3,585
  • 5
  • 42
  • 78
6
votes
1 answer

How to Authenticate by appId and key in loopback restapi

i am wondering how to authenticate app to make requests to endpoints as i am getting 401 errors i have successfully generated app id and appkeys and which should be used as there is no documentation on it.
itsbalamurali
  • 192
  • 1
  • 2
  • 10
6
votes
1 answer

StrongLoop Loopback Yeoman Angular

I'm trying to integrate StrongLoop Loopback [backend] with the Yeoman workflow [frontend] but struggling to unite the two codebases. I know I could independently develop my "backend" using StrongLoop's Loopback and just expose it as a REST API. …
JonnyMD
  • 103
  • 6
6
votes
1 answer

How to call custom query URL using Restangular?

I want to call URL with special charecters in query parameter using Restangular customGET method. I am using Loopback for my API, which uses square brackets for query. It seems it's not allowed in Restangular. I want to call following…
fusionstrings
  • 1,025
  • 2
  • 13
  • 23
5
votes
1 answer

MongoParseError: Load balancer mode requires driver version 4+

I have built a loopback 3 app with mongodb, worked perfectly on local and vps. But I wanted to opt for the SaaS (mongodb.com and heroku.com) and now I am facing an error: …
Haythem
  • 384
  • 1
  • 12
5
votes
2 answers

Schema based Multi tenancy in Loopback 4

Use case In schema based multi-tenant applications there normally is one database with multiple schemas. One schema is the main where the common application data is stored and one for each tenant of the application. Everytime a new customer is…
user3170450
  • 375
  • 3
  • 20