Socket
Book a DemoInstallSign in
Socket

slspress-config-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slspress-config-loader

Loads config files

2.2.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

#slspress-config-loader

Loads environment config from a env config yaml file, a secret file and environment properties merging them together.

The idea is that the serverless.yml file can reference a file that calls this to load config that is then available in the serverless.yml file

For example:

serverless.yml:

custom:
  conf: ${file(./config/config-loader-${opt:stage}.js):config}

provider:
  region: ${self:custom.conf.region}
  vpc: ${self:custom.conf.vpc}
  environment: ${self:custom.conf.env}
  
...

config/config-loader-development.js:

module.exports.config = () => require('slspress-config-loader')(__dirname, 'development');

config/config.development.yml:

region: "us-east-1"
vpc:
  securityGroupIds:
    - ""
  subnetIds:
    - ""
    - ""
env:
  SOME_CONFIG: "config-value"

config/config.development.secret.yml: // added to .gitignore

env:
  SOME_SECRET_KEY: "shhh"

FAQs

Package last updated on 07 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.