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 configuration issues in Cloud 9 workspace

I am facing issue in running two instances at the same of loopback in Cloud 9 workspace: 1) Composing model visually --> slc arc 2) Running the app -> node . I am able to run these two separately but can't run them together. Please let me know if I…
rahulthakur319
  • 455
  • 4
  • 16
1
vote
1 answer

Strongloop property from relation in parent

I don't know if I'm just blind or something but how can I do the following: I have a User model with a hasOne relation to a UserData model. I only want one property of UserData directly in the results of User. The relation in User looks like…
toXel
  • 165
  • 3
  • 9
1
vote
0 answers

Nodejs - Upload image to mongo document, then retrieve it

I've been struggling for a While now. I want to upload an image to mongo, not GridFS, I want tu save the image in a document. This is what I have so far: To upload the image: News.image = function (id, req, res, cb) { …
danielrvt
  • 10,177
  • 20
  • 80
  • 121
1
vote
0 answers

How to query only with included models?

I have a query that looks like this: User.find({ include: { relation: 'Comment', scope: { where: { text: { like: '%some text' } } } } }, function (err, users) { …
Diego
  • 11
  • 1
1
vote
1 answer

Geospatial filtering of documents with locations within a given radius from given point with LoopbackJS

There is a requirement to do a query for documents which are within a certain radius from a given point. If you use MongoDB as a database, you can do the following: create geospatial 2dsphere index; save data in a proper format; filter documents…
Alex V
  • 1,155
  • 8
  • 10
1
vote
1 answer

Loopback android sdk REST api with filter

As I am trying to make use of loopback to develop an application where users could filter data using one to four criteria, depending on their need, I tried to search through the web to see if there is any solution. It seems that this feature has not…
Ken Kwok
  • 388
  • 3
  • 19
1
vote
0 answers

Node js Error in Openshift

I have developed a project using Loopback. I am trying to deploy it to Openshift. I am using openshift-cartridge-strongloop. when i am creating an application to openshift. During installation it shows remote: npm ERR! peerinvalid The package chai…
Rafi Ud Daula Refat
  • 2,187
  • 19
  • 28
1
vote
2 answers

Performance with hash-and-range primary key: Dynamodb

I am building an application using Node.js and loopback. A component of the application is storing login attempts into DynamoDB. I am very new to this DB and I am running into issues. Currently, my hash key is an email and my range key is a…
sirrele
  • 171
  • 1
  • 6
1
vote
2 answers

How to authenicate using static role in Loopback ACL

Having issues getting authentication working using static roles access control within models. Things seem to be working when using ACL's with principal types $authenticated and $everyone. So access controls are in place and functioning as expected…
switcher
  • 11
  • 4
1
vote
3 answers

Loopback include unrelated lists

In Loopback it is easy to include relational objects when querying for data. For example, one can include all the comments that belong to a blog post in a single call using the include filter. But in my case I want to get data that doesn't have a…
Vivendi
  • 20,047
  • 25
  • 121
  • 196
1
vote
2 answers

Async validation never returns in loopback

I have an async validation in one of my models in which I query for a related object to validate it's existence. The problem is that the request is timing out on this validation and the server never responds. module.exports = function(Ip) { //…
Romeo Mihalcea
  • 9,714
  • 12
  • 50
  • 102
1
vote
3 answers

Loopback default models with a mysql database

I'm trying out loopback and noticed that in the model-config file it has a reference to 5 models that have their dataSource set to the memory database db: "User": { "dataSource": "db" }, "AccessToken": { "dataSource": "db", …
Romeo Mihalcea
  • 9,714
  • 12
  • 50
  • 102
1
vote
1 answer

Can I use Loopback Model Validations only when a property is certain value

I have a "post"-model in strongloop loopback with some properties: title text tags category published (true or false) Is it possible to use the model validations in strongloop loopback, but only when I want to publish the post, not when I save it?
Ernie
  • 972
  • 1
  • 10
  • 23
1
vote
0 answers

Strongloop: Add related model instance to a database

I have three models with relation as : common/models/customer.json "relation": { "fundSource": { "type": "hasMany", "model": "CreditCard", "foreignKey": "", "through": "fundingEntities" } } common/model/funding-entities.json "relations":…
lure
  • 103
  • 2
  • 9
1
vote
2 answers

User can't access or edit himself in LoopBackJS

Please could anyone help me? I've created an admin user and a simple user, the admin can do anything thats ok, but I'm trying to edit the simple user using his own authenticated token, and I got unauthorized everytime even with get, post, put or…