5.0.1 • Published 2 years ago

@labshare/services v5.0.1

Weekly downloads
507
License
MIT
Repository
github
Last release
2 years ago

Coverage Status Build Status semantic-release codecov

LabShare Services

Usage

npm i @labshare/services

const {Services} = require('@labshare/services');

let options = {
    // Override default options. 
    // The available configuration options are described in the "Configuration" section below.
};

let services = new Services(options);

services.config(({app, services}) => {
   // Optionally perform additional customization of the Express app initialized by Services and the loaded routes
   // Example (adds Express.js compression middleware):
   app.use(compression());
});

// Start up the server with all the loaded HTTP and Socket APIs
services.start();

Configuration

Configuring LabShare Services

Environment Variables

LabShare Service Plugins

Example plugin usage

const {Services} = require('@labshare/services');
const servicesAuth = require('@labshare/services-auth');

const services = new Services({/* options */);

services.config(servicesAuth({/* options */}));

Default HTTP Routes

Versions

GET /<service-path>/versions

Response

{
   "buildVersion":"v2017.0914.5",
   "versions": [
       {"api":"ls", apiDetails":{"name":"labshare","version":"v0.17.0631","description":"LabShare Services"}}
   ]
}

Example: http://localhost:8000/versions

API Explorer

GET /<service-path>/explorer

Response

Swagger HTML page providing documentation for endpoints across all API packages

Example: http://localhost:8000/explorer

Working with LabShare APIs

Running APIs

Running Loopback APIs

Creating HTTP APIs

Creating Socket APIs

Managing APIs with PM2

Development

  1. Install Node.js.
  2. npm i -g lsc
  3. Run npm install inside the Service's root directory to install its dependencies.

Tests

npm test

LoopBack

5.0.1

2 years ago

5.0.0

2 years ago

3.5.0

2 years ago

4.11.0

2 years ago

4.10.5

3 years ago

4.10.4

3 years ago

4.10.3

4 years ago

4.10.2

4 years ago

4.10.1

4 years ago

4.9.1

4 years ago

4.10.0

4 years ago

4.9.0

4 years ago

4.8.0

4 years ago

4.7.0

4 years ago

4.6.0

4 years ago

4.5.5

4 years ago

4.5.4

4 years ago

4.5.3

4 years ago

4.5.2

4 years ago

4.5.1

4 years ago

4.5.0

4 years ago

4.4.0

4 years ago

4.3.0

4 years ago

4.2.0

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.11

4 years ago

4.0.10

4 years ago

4.0.9

4 years ago

4.0.8

4 years ago

4.0.7

4 years ago

4.0.6

4 years ago

4.0.5

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

3.4.2

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.4.1

4 years ago

3.3.3

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.18.514

6 years ago

0.18.514

6 years ago

0.18.304

6 years ago

0.18.222

6 years ago

0.17.1023

7 years ago

0.17.824

7 years ago

0.17.510

7 years ago

0.17.219

7 years ago