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

Remote method for updating all records

I try to make a custom endpoint, which adds a bonus to all employee. And retorns all the employee records, just like the get endpoint. Something like /employees/bonus As I understand; I should make a remote method for…
user3568719
  • 1,036
  • 15
  • 33
1
vote
1 answer

LoopBack installation failed with error code "ECONNRESET"

I wanted follow this tutorial and one of the first steps - the installation of LoopBack failed. The type npm-debug.log tells: 41099 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" …
Valentin H
  • 7,240
  • 12
  • 61
  • 111
1
vote
1 answer

Count method throws syntax error when used with where clause in loopback

I am using loopback/strong loop in node.js. I am trying to use where clause in count method for paginition purpose. Whenever I try to use where clause, it gives me a mysql syntax error for as simple query as…
sabu
  • 1,969
  • 4
  • 18
  • 28
1
vote
0 answers

Google Cloud Storage support for LoopBack

According to Loopbacks' storage component document, it doesn't support Google Cloud Storage. But as the component uses pkgcloud to support the cloud based storage services; and pkgcloud did have the support for CGS. Is there a quick and safe way…
Hoang HUA
  • 325
  • 4
  • 7
1
vote
1 answer

Loopback: Cannot find module 'negotiator'

I'm trying to use Loopback to create an api for my existing database. When I try to 'discover' the model, I get this error: Message: Cannot find module 'negotiator' Request:…
Ethan Strider
  • 7,849
  • 3
  • 24
  • 29
1
vote
1 answer

Loopback.io find with include

I'm using Loopback.io, with MongoDB. I can't figure how to use the "include" filter. The goal is to have "theuser" be included fully in the "group" when done a find() or findOne(). All I get now is the id's in an array. Thanks theuser.json: { …
rhymn
  • 121
  • 2
  • 6
1
vote
0 answers

EAI_AGAIN error while making SMTP connection in Loopback

datasource.json: "emailDs": { "name": "emailDs", "connector": "mail", "transports": [{ "type": "smtp", "host": "smtp.myapp.in", "secure": true, "secureConnection": true, "port": 587, …
1
vote
1 answer

loopback gives undefined on modelName.afterRemoteError

Member.afterRemoteError('assignDepartment', function (ctx, next) { console.log("in after remote error"); next(); }); I tried console.log(Member.afterRemoteError) but got undefined :( I am using strongloop v3.0.6
mitesh
  • 916
  • 9
  • 13
1
vote
2 answers

Why StrogLoop doesn't start the app with "$ slc start"?

In all their tutorial Getting started with LoopBack they start the app with $ slc start. I follow the tutorial step by step but my app doesn't start with $ slc start. I mean, the server localhost:3000 isn't started with the command. However, it…
Green
  • 28,742
  • 61
  • 158
  • 247
1
vote
1 answer

How can i pass input argument when writing loopback-testing

I am writing a test driven development for my strongloop API code with the help of loopback-testing . Here they do not have any detailed document on this, so i am stuck with case of argument passing with the API call Example i have a below…
Sakeer
  • 1,885
  • 3
  • 24
  • 43
1
vote
1 answer

Send Response in Loopback on remote method with afterRemote hook

I am trying to process a request that needs a mail to be sent. In order to respond to the request without waiting for the mail to be sent i am sending the mail on an afterRemote hook. The method seems to run correctly and the mail is sent, but for…
Evan
  • 1,683
  • 7
  • 35
  • 65
1
vote
1 answer

Loopback datasource.json - forcing SSL connection

I don't see anything in the documentation about it. I need to be able to use an SSL connection to my Postgres db (accessing a Heroku instance externally). Is there a way to set this in datasources.json?
Lee
  • 1,389
  • 3
  • 18
  • 28
1
vote
1 answer

How do I use env.DATABASE_URL with Loopback in Heroku?

I've removed datasources.json and added a datasources.local.js file. var postgresURI = process.env.DATABASE_URL; module.exports = { db: { defaultForType: 'postgresql', connector: 'postgresql', url: postgresURI } }; In…
Lee
  • 1,389
  • 3
  • 18
  • 28
1
vote
1 answer

Node.js periodic tasks with clustering

I'm running StrongLoop's Loopback API server in production mode. This means that master process creates as many workers, how many cores your CPU has. So master process only controls workers and never execute your code. My purpose is to execute…
IvanZh
  • 2,265
  • 1
  • 18
  • 26
1
vote
1 answer

Browserifing Loopback's client

I am trying to get this working: Running LoopBack in the browser Whilst API works great, attempt to browserify the copy of file 'browser-app.js' throw an error: Error: Cannot find module 'loopback-boot#instructions' from…
leitasat
  • 896
  • 3
  • 12
  • 14