1.1.1 • Published 7 years ago

@gigster/module-loopback-base v1.1.1

Weekly downloads
6
License
UNLICENSED
Repository
-
Last release
7 years ago

loopback_base

RoleNameEmailSlack
Product OwnerRyan Borkerborker@gigster.com@borker
MaintainerJerome Curlierjerome@gigster.com@jerome

Overview

The Loopback base module modify the Loopback generated boilerplate to add code and configuration to ease further module development, to set the standard for the project and to productionize the Loopback project.

Usage

      modules:
        - name: loopback-base
          location: >-
            https://github.com/liquidlabs-co/gig-modules/tree/master/block/loopback-base

Endpoints

The modules generate the endpoind for the ping:

EndpointDescription
POST /pingProvide {"started":"2017-12-15T22:25:31.416Z","uptime":12.795} for the application to enable monitoring.

Generation

Boot

The following boot file is added to the Loopback application:

  • ping.js

Configuration

The following configuration file is added to the Loopback application:

  • component-config.production.json

Test

The following test files are added to the Loopback application:

  • test\e2e\explorer\index.spec.js
  • test\e2e\ping\index.spec.js

Troubleshooting

Tests

Module tests are defined using a test/scenarios.yaml file. This file defines the set of example gigs that we generate as part of integration testing. To run all tests, run yarn test at the root of this module.

Each scenario is generated in test/scenario/<name> which you can then cd into and run the actual app. For a scenario called default, this is done via:

cd test/scenario/default
yarn install

# Run tests.
yarn test

# Start the app.
yarn start

TODO