loopback-connector-placeholder

1.0.0 • Public • Published

loopback-connector-placeholder

Placeholder loopback connector for not failing upon application initialization.

Installation

Add the loopback-connector-placeholder dependency to your project using yarn or npm.

npm install --save loopback-connector-placeholder
or
yarn add loopback-connector-placeholder

Add Datasource

Add datasource to your datasources.json (or a js file as documented here)

{
    "placeholder": {
        "name": "placeholder",
        "connector": "placeholder",
        "writeError": true,
        "deleteError": true,
        "readError": true
    }
}

writeError, deleteError and readError are optional. If set, these parameters can be either true in which case a default error is thrown on the respective operation, or a string in which case the error is replaced by the string provided. If they are not set, the response will simulate a success.

❗ Note that many write operations also use read operations in the background. So throwing a (custom) error in read operations will also be thrown in those write operations.

Licence

MIT License

Copyright (c) Marios Vertopoulos & Vassilis Katsaris

Readme

Keywords

none

Package Sidebar

Install

npm i loopback-connector-placeholder

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.83 kB

Total Files

4

Last publish

Collaborators

  • mvertopoulos