-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy strongloop/loopback.io to github.com/strongloop/loopback.io.gi…
…t:gh-pages
- Loading branch information
Showing
38 changed files
with
967 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "Cassandra connector" | ||
lang: en | ||
layout: readme | ||
source: loopback-connector-cassandra | ||
keywords: LoopBack, connector | ||
tags: readme | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Cassandra-connector.html | ||
summary: The Cassandra connector enables LoopBack applications to connect to Cassandra data sources. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "Cloudant connector" | ||
lang: en | ||
layout: readme | ||
source: loopback-connector-cloudant | ||
keywords: LoopBack, connector | ||
tags: [connectors, readme] | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Cloudant-connector.html | ||
summary: The Cloudant connector enables LoopBack applications to connect to Cloudant data sources. | ||
--- | ||
{% include see-also.html content=" | ||
- [Getting Started with LoopBack and IBM Cloudant](https://developer.ibm.com/bluemix/2015/09/10/getting-started-node-js-loopback-framework-ibm-cloudant/) | ||
" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: "Community connectors" | ||
lang: en | ||
layout: page | ||
keywords: LoopBack | ||
tags: | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Community-connectors.html | ||
summary: | ||
--- | ||
|
||
In addition to the connectors that StrongLoop provides and maintains, there are a number of connectors created by the open-source community. | ||
|
||
{% include warning.html content="IBM and StrongLoop do not support the connectors listed here; they are maintained by the LoopBack community and are listed here for convenience. | ||
|
||
Please contact IBM/StrongLoop to request support for one of these connectors or to request an additional connector. | ||
" %} | ||
|
||
The following table lists some of the community connectors. See [npmjs.org](https://www.npmjs.org/search?q=loopback-connector) for a complete list. | ||
|
||
{% include note.html content="See also [https://github.com/pasindud/awesome-loopback](https://github.com/pasindud/awesome-loopback) for an extensive list of LoopBack community resources. | ||
" %} | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th width="160">Data source</th> | ||
<th width="280">Connector</th> | ||
<th>Notes</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><a href="http://couchdb.apache.org/" class="external-link" rel="nofollow">Apache CouchDB</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-couch" class="external-link" rel="nofollow">loopback-connector-couch</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://kafka.apache.org/" class="external-link" rel="nofollow">Apache Kafka</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-kafka" class="external-link" rel="nofollow">loopback-connector-kafka</a></td> | ||
<td>Provided as option by <a href="Data-source-generator.html">data source generator</a>.</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://www.arangodb.com/" class="external-link" rel="nofollow">ArangoDB</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-arangodb" class="external-link" rel="nofollow">loopback-connector-arangodb</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://www.couchbase.com/" class="external-link" rel="nofollow">Couchbase</a></td> | ||
<td><a href="https://github.com/guardly/loopback-connector-couchbase" class="external-link" rel="nofollow">loopback-connector-couchbase</a></td> | ||
<td>Example at <a href="https://github.com/guardly/loopback-example-couchbase" class="external-link" rel="nofollow">loopback-example-couchbase</a></td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://www.elasticsearch.org/" class="external-link" rel="nofollow">Elasticsearch</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-es" class="external-link" rel="nofollow">loopback-connector-es</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://fabric-composer.org/" class="external-link" rel="nofollow">Fabric Composer</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-composer" class="external-link" rel="nofollow">loopback-connector-composer</a></td> | ||
<td>Enables integration with Blockchain applications that are built with Fabric Composer for Hyperledger Fabric</td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://firebase.google.com/products/firestore/" class="external-link" rel="nofollow">Firebase Firestore</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-firestore" class="external-link" rel="nofollow">loopback-connector-firestore</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://firebase.google.com/products/realtime-database/" class="external-link" rel="nofollow">Firebase Realtime Database</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-realtime-database" class="external-link" rel="nofollow">loopback-connector-realtime-database</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://cloud.google.com/datastore/" class="external-link" rel="nofollow">Google Cloud Datastore</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-google-cloud-datastore" class="external-link" rel="nofollow">loopback-connector-google-cloud-datastore</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://mandrill.com/" class="external-link" rel="nofollow">Mandrill</a></td> | ||
<td><a href="https://www.npmjs.org/package/lb-connector-mandrill" class="external-link" rel="nofollow">lb-connector-mandrill</a></td> | ||
<td>Enables applications to send emails via Mandrill</td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://neo4j.com/" class="external-link" rel="nofollow">Neo4j</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-neo4j" class="external-link" rel="nofollow">loopback-connector-neo4j</a></td> | ||
<td>Provided as option by <a href="Data-source-generator.html">data source generator</a>. | ||
<br/>NOTE: This connector has <a href="https://groups.google.com/forum/#!topic/loopbackjs/HONEM1S3CnU" class="external-link" rel="nofollow">known issues</a>. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://ravendb.net/" class="external-link" rel="nofollow">RavenDB</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-ravendb" class="external-link" rel="nofollow">loopback-connector-ravendb</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://www.rethinkdb.com/" class="external-link" rel="nofollow">RethinkDB</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-rethinkdb" class="external-link" rel="nofollow">loopback-connector-rethinkdb</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://basho.com/riak/" class="external-link" rel="nofollow">Riak</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-riak" class="external-link" rel="nofollow">loopback-connector-riak</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://hana.sap.com/abouthana.html" class="external-link" rel="nofollow">SAP HANA</a></td> | ||
<td><a href="https://www.npmjs.org/package/loopback-connector-saphana" class="external-link" rel="nofollow">loopback-connector-saphana</a></td> | ||
<td><span>Provided as option by </span> <a href="Data-source-generator.html">data source generator</a><span>.</span></td> | ||
</tr> | ||
<tr> | ||
<td><a href="http://www.sqlite.org/" class="external-link" rel="nofollow">SQLite</a></td> | ||
<td><a href="https://github.com/Synerzip/loopback-connector-sqlite" class="external-link" rel="nofollow">loopback-connector-sqlite</a></td> | ||
<td> </td> | ||
</tr> | ||
<tr> | ||
<td><a href="https://www.twilio.com/" class="external-link" rel="nofollow">Twilio</a></td> | ||
<td><a href="https://www.npmjs.com/package/loopback-connector-twilio" class="external-link" rel="nofollow">loopback-connector-twilio</a></td> | ||
<td><a href="https://github.com/dashby3000/loopback-connector-twilio/blob/master/example/example.js" class="external-link" rel="nofollow">Example</a> in GitHub.</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "Microsoft SQL Server connector tutorial" | ||
lang: en | ||
layout: readme | ||
source: loopback-example-database | ||
branch: mssql | ||
keywords: LoopBack | ||
tags: example_app | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-Microsoft-SQL-Server.html | ||
summary: A brief tutorial on using the LoopBack MS SQL connector. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "MongoDB Connector Tutorial" | ||
lang: en | ||
layout: readme | ||
source: loopback-example-database | ||
keywords: LoopBack | ||
tags: example_app | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-MongoDB.html | ||
summary: A brief tutorial on using the LoopBack MongoDB connector. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "MySQL Connector Tutorial" | ||
lang: en | ||
layout: readme | ||
source: loopback-example-database | ||
branch: mysql | ||
keywords: LoopBack | ||
tags: example_app | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-MySQL.html | ||
summary: A brief tutorial on using the LoopBack MySQL connector. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: "Oracle Connector Tutorial" | ||
lang: en | ||
layout: navgroup | ||
navgroup: oracle | ||
source: loopback-example-database | ||
branch: oracle | ||
keywords: LoopBack | ||
tags: example_app | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-Oracle.html | ||
summary: A brief tutorial on using the LoopBack Oracle connector. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "PostgreSQL connector tutorial" | ||
lang: en | ||
layout: readme | ||
source: loopback-example-database | ||
branch: postgresql | ||
keywords: LoopBack | ||
tags: example_app | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-PostgreSQL.html | ||
summary: A brief tutorial on using the LoopBack PostgreSQL connector. | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
--- | ||
title: "Connecting to SOAP web services" | ||
toc: false | ||
layout: page | ||
keywords: LoopBack | ||
tags: | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connecting-to-SOAP.html | ||
summary: The LoopBack CLI enables you to easily create models based on a SOAP web service. | ||
--- | ||
{% include navgroups/soap.md %} | ||
{% include toc.html %} | ||
|
||
## Overview | ||
|
||
Web services enable applications to communicate with each other independent | ||
of platform and language. A web service is a software interface that describes a collection | ||
of operations that can be invoked over the network through standardized XML messaging using | ||
Simple Object Access Protocol ([SOAP](https://www.w3.org/TR/soap/)). Web Services Description Language ([WSDL](https://www.w3.org/TR/wsdl20/)) is an | ||
XML document that describes web service endpoints, bindings, operations and schema. | ||
|
||
{% include image.html file="loopback-soap-integration.png" alt="LoopBack SOAP integration" %} | ||
|
||
Web services are still important in many enterprises, and the way to access them is via SOAP. | ||
SOAP is fairly heavy-weight, and working with XML-based SOAP | ||
payloads in Node.js is not easy. It’s much easier to use JSON and to wrap or mediate a SOAP | ||
service and expose it as a REST API. | ||
|
||
To support the "API design first" approach, the [SOAP generator](SOAP-generator.html) creates LoopBack models and REST APIs for WSDL/SOAP operations to enable a LoopBack app to invoke a web service without the need to write code. | ||
|
||
## Example | ||
|
||
This example demonstrates using the [SOAP generator](SOAP-generator.html) to | ||
connect a LoopBack application to a SOAP data source to: | ||
|
||
- Generate models and remote methods to invoke SOAP operations. | ||
- Play with the live APIs served by LoopBack using the API Explorer. | ||
- Invoke the web service through your REST API. | ||
|
||
### Create a LoopBack application | ||
|
||
The first step is to create a new LoopBack application. For example: | ||
|
||
```sh | ||
$ lb app soap-demo | ||
``` | ||
|
||
When prompted, select either LoopBack 3.x or 2.x and `empty-server` application. | ||
|
||
### Generate SOAP data source | ||
|
||
Next, create a data source for the SOAP web service. | ||
This example will use the publicly-available [Periodic table web service](http://www.webservicex.net/New/Home/ServiceDetail/19). | ||
|
||
Create a new data source using the [data source generator](Data-source-gnerator.html): | ||
|
||
``` | ||
$ cd soap-demo | ||
$ lb datasource | ||
``` | ||
|
||
When prompted, respond as follows: | ||
|
||
- Enter the data-source name, for example "periodicSoapDS". | ||
- Select "Soap Webservices (supported by StrongLoop)" from the list of connectors. | ||
- Enter http://www.webservicex.net/periodictable.asmx for "URL to the SOAP web service endpoint" prompt. | ||
- Enter http://www.webservicex.net/periodictable.asmx?WSDL for "HTTP URL or local fie system path to WSDL file" prompt. | ||
- Enter "y" to Expose operations as REST APIs. | ||
- Leave blank to "Maps WSDL binding operations to Node.js methods". | ||
- Select "y" to "Install "loopback-connector-soap" prompt. This runs `npm install -s loopback-connector-soap`. | ||
|
||
For more information on SOAP datasource properties, see [SOAP data source properties](http://loopback.io/doc/en/lb3/SOAP-connector.html). | ||
|
||
### Generate APIs from the SOAP data source | ||
|
||
Now use the [SOAP generator](SOAP-generator.html) to generate models from the SOAP data source. | ||
|
||
```sh | ||
$ lb soap | ||
``` | ||
|
||
This command lists the SOAP data sources defined for this application; | ||
for this example, it will list the one you just created. | ||
|
||
``` | ||
? Select the datasource for SOAP discovery | ||
❯ periodicSoapDS | ||
``` | ||
|
||
The generator loads the WSDL for the selected SOAP data source and discovers | ||
services that the WSDL defines. | ||
It then prompts you to select the service from a list (in this example, there is only one). | ||
|
||
``` | ||
? Select the service: periodictable | ||
``` | ||
|
||
After you choose a service, the tool discovers and lists the bindings in the selected service | ||
(in this example, there are two: `periodictableSoap` and `periodictableSoap12`). | ||
Select the `periodictableSoap` binding. | ||
|
||
``` | ||
? Select the binding: periodictableSoap | ||
``` | ||
|
||
After you choose a binding, the tool discovers and lists SOAP operations that the selected binding defines. Press the space bar to select all of the listed SOAP operations. | ||
|
||
``` | ||
◉ GetAtoms | ||
◉ GetAtomicWeight | ||
◉ GetAtomicNumber | ||
❯◉ GetElementSymbol | ||
``` | ||
|
||
After you choose one more more operations, the tool generates remote methods and a REST API that can | ||
invoke the web service at `http://www.webservicex.net/periodictable.asmx`. | ||
|
||
#### Generated and modified files | ||
|
||
The tool modifies `server/model-config.json` with configuration for all models derived | ||
from the SOAP service. | ||
|
||
The tool generates the following model definition files in the `server/models` directory: | ||
|
||
- `get-atomic-number-response.json` / `.js`: GetAtomicNumberResponse definition / extension. | ||
- `get-atomic-weight-response.json` / `.js`: GetAtomicWeightResponse definition / extension. | ||
- `get-atoms-response.json` / `.js`: GetAtomsResponse definition / extension. | ||
- `get-atoms.json` / `.js`: Getatoms definition / extension. | ||
- `get-element-symbol-response.json` / `.js`: GetelementsymbolResponse definition / extension. | ||
- `get-element-symbol.json` / `.js`: Getelementsymbol definition / extension. | ||
- `get-atomic-number.json`: GetAtomicNumber definition. | ||
- `get-atomic-number.js`: GetAtomicNumber extension. | ||
- `get-atomic-weight.json`: GetAtomicWeight model definition. | ||
- `get-atomic-weight.js`: GetAtomicWeight model extension. | ||
- `soap-periodictable-soap.json`: Model to host all APIs. | ||
- `soap-periodictable-soap.js`: Methods that invoke web service operations. | ||
|
||
### Run the application | ||
|
||
To run the application: | ||
```sh | ||
node . | ||
``` | ||
|
||
Open your browser to http://localhost:3000/explorer. | ||
|
||
{% include image.html file="soap-api-explorer.png" alt="API Explorer for SOAP demo app" %} | ||
|
||
As you see, SOAP operations defined in the WSDL document are now available. | ||
|
||
Let's give a try: | ||
|
||
- Click on 'GetAtomicNumber' API. | ||
- Under 'Parameters' click on 'Example Value' text box. This will fill in 'GetAtomicNumber' value text box. | ||
- Fill in the 'ElementName' as 'Copper' or 'Iron' or any element name from the periodic table. | ||
- Click on 'Try it out' button. | ||
|
||
{% include image.html file="invoke-api-webservice.png" alt="Invoking SOAP service via API Explorer" %} | ||
|
||
This will invoke the REST API which is generated in `soap-periodictable-soap.js`. This REST API in turn | ||
invokes the periodic table Web Service hosted at `http://www.webservicex.net/periodictable.asmx` returning SOAP result back to the API explorer. | ||
|
||
{% include image.html file="api-webservice-result.png" alt="Response from SOAP service in API Explorer" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: "LoopBack data source connectors" | ||
lang: en | ||
toc: false | ||
keywords: LoopBack | ||
tags: [data_sources] | ||
sidebar: lb4_sidebar | ||
permalink: /doc/en/lb4/Connectors-reference.html | ||
summary: LoopBack connectors implement the data exchange logic to communicate with backend systems such as relational or NoSQL databases, or other REST, or SOAP API. | ||
--- | ||
|
||
LoopBack connectors include: | ||
|
||
- Built-in [memory connector](Memory-connector.html) - Acts like a database connector, in that it supports standard query and create, read, update, and delete (CRUD) operations. It is intended for local development and testing. | ||
- [Database connectors](Database-connectors.html) - Connect to relational and NoSQL databases, | ||
- [Other connectors](Other-connectors.html) - Connect to REST or SOAP APIs and other backend systems. | ||
- [Community connectors](Community-connectors.html) - Connectors created, maintained, and supported by the LoopBack open-source community. |
Oops, something went wrong.