2.0.1 • Published 3 years ago

serverless-plugin-config v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

serverless-plugin-config

Wraps the excellent npm library config and injects it into the serverless custom object.

Downloads Version License

header

Installation

npm install -D serverless-plugin-config

or

yarn add -D serverless-plugin-config

Plugin Dependency

In your projects serverless file, add serverless-plugin-config to the list of your plugins:

plugins:
  - serverless-plugin-config

Usage

You can now reference values from your config based settings with the following syntax.

${config:<value>}

Example:

provider:
  environment:
    DOMAIN: ${config:domain}

Custom Declaration

The default directory for configuration is process.cwd() + 'config'. You can set up a specific directory by following the example below.

custom:
  config:
    dir: settings/env

Commands

config debug

Displays the configuration data resolved by the config lib. In the example here, running the command will produce the following:

$ npx serverless config debug -s beta
config: {
  "domain": "api-beta.test.com"
}

Changelog

2.0.0

1.0.1

  • Fixing spelling issues and lifecycle events

1.0.0

  • Initial upload
2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago