Questions tagged [loopbackjs]

LoopBack is an open source Node.js framework built on top of Express 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 JS, iOS & Android SDKs.

The LoopBack framework is a set of 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 , , and . 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.

Source: https://github.com/strongloop/loopback

Documentation: http://docs.strongloop.com/display/LB/LoopBack

Debugging: https://loopback.io/doc/en/lb3/Setting-debug-strings.html

2851 questions
50
votes
7 answers

How to store files with meta data in LoopBack?

What I want to do: Have an html form, with a file input inside. When a file is chosen, the file input should upload the file, and get a file id, so when the form is submitted, the file id is posted with the form and written in the database. Shorter…
Mihaly KR
  • 2,333
  • 2
  • 17
  • 20
32
votes
1 answer

Destroy a model in loopback.io

How can I delete a model in strongloop's loopback.io? I have seen somewhere command called persistedModel.destroy() but when I exectute slc persistedModel.destroy() I get command not found error.
Abhishek Goel
  • 15,517
  • 8
  • 81
  • 62
25
votes
8 answers

How can I use body-parser with LoopBack?

I see that LoopBack has the Express 3.x middleware built-in. Indeed, body-parser is in loopback/node_modules. But I cannot figure out how to use it as middleware. I have never worked with Express 3.x, so maybe it's just that. require does not work,…
Antrikshy
  • 2,334
  • 3
  • 30
  • 51
22
votes
3 answers

Advice on loopback.js vs express js

Planning to build an enterprise level application using node js. Have already worked on express js for a few projects. When researching for other possible frameworks, came across loopback js. Loopback.js, a new framework(3-4 years) built over…
Shiva
  • 281
  • 1
  • 3
  • 11
21
votes
5 answers

Best practice for nodejs deployment - Directly moving node_modules to server or run npm install command

What is the best practice for deploying a nodejs application? 1) Directly moving the node_modules folders from the development server to production server, so that our same local environment can be created in the production also. Whatever changes…
Sanjay Kumar N S
  • 4,165
  • 3
  • 18
  • 34
20
votes
2 answers

What is the difference between common and server models in loopback?

When I'm creating a model in strongloop with the following command: slc loopback:model loopback asks me for choose between common model or server. Common model or server only? I really don't know what criteria to take into account to choose…
Luillyfe
  • 4,659
  • 8
  • 28
  • 41
19
votes
1 answer

Add multiple dir for static files in Loopback

Loopback has two areas where paths are set for static files: server.js var path = require('path'); app.use(loopback.static(path.resolve(__dirname, '../client'))); middleware.json "files": { "loopback#static": { "params":…
Lee
  • 1,231
  • 2
  • 15
  • 24
19
votes
3 answers

Ensure unique field value in loopback model

How to ensure uniqueness of a particular field in loopback model. Like below is the model Post, I have a field genericId in it, I want it to be unique in the database, and loopback to through an error, on duplicate key insertion. { "name":…
Nishant
  • 3,424
  • 1
  • 16
  • 26
18
votes
4 answers

How to proceed with Hybrid Mobile Application Idea?

We have monetizable Mobile Application Idea, and will be building our first mobile Hybrid application. I looked into few things and figured out that to achieve my end-to-end goal I would need: Front End UI Framework : possible options: Ionic /…
16
votes
8 answers

Auto-create mysql table with StrongLoop

I am trying to use Strongloop with MySql but cannot figure out how to migrate or automatically create tables into a MySql database. Is there at least a way to export the models into MySql schemas or do I have to manually create the tables? I've been…
glesage
  • 875
  • 2
  • 13
  • 30
15
votes
1 answer

What does "through model" mean in loopback?

When defining relation using "slc loopback:relation", it prompts about "through model" at the last line. ? Select the model to create the relationship from: CoffeeShop ? Relation type: has many ? Choose a model to create a relationship with:…
Zhou Nan
  • 151
  • 1
  • 3
14
votes
1 answer

soap on node is parsing json to xml wrong

Using the Soap module in Nodejs (via loopback-connector-soap), I'm trying to convert json to xml for my soap request, but I have a few problems... What it is:
Geoffrey Burdett
  • 1,580
  • 1
  • 12
  • 23
14
votes
5 answers

How to Modify the StrongLoop's LoopBack Explorer CSS

We're using Strongloop's LoopBack for our REST APIs and would like to modify the CSS for the LoopBack Explorer. However, it's not clear which CSS files are being used (LoopBack vs Swagger) and where they're located. I was not able to find specific…
A2MetalCore
  • 1,394
  • 2
  • 22
  • 42
13
votes
1 answer

How to setup OAuth 2.0 server using loopback

I want to setup an OAuth 2.0 Server using Loopback using a package called loopback-component-oauth2 The documentation is here : https://docs.strongloop.com/display/public/LB/OAuth+2.0#OAuth2.0-UsingtheOAuth2component But it is very unclear, what…
user3655266
  • 794
  • 2
  • 8
  • 21
13
votes
2 answers

Creating Permanent AccessToken in loopback

How to create a permanent access token for a StrongLoop API. Now for every user login it creates an access token. And unnecessary entry in my db I can increase the validity of access token(ttl) as mentioned here. But still it will generate for new…
Rameez
  • 571
  • 1
  • 7
  • 21
1
2 3
99 100