Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qszhu/slsenv
Loads .env into serverless.yml
https://github.com/qszhu/slsenv
Last synced: 11 days ago
JSON representation
Loads .env into serverless.yml
- Host: GitHub
- URL: https://github.com/qszhu/slsenv
- Owner: qszhu
- Created: 2020-06-16T15:33:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T22:16:12.000Z (almost 3 years ago)
- Last Synced: 2024-11-15T21:43:43.760Z (about 1 month ago)
- Language: JavaScript
- Size: 95.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### SLSENV
Load the contents of `.env` into `serverless.yml` (Serverless Component V2).
#### Install
```bash
$ npm i -g slsenv
```#### Run
In project root folder which has `.env` and `serverless.yml`, run:
```bash
$ slsenv
```Changes are write back to `serverless.yml`.
#### Config
Create `.slsenvrc` in project root folder
```json
{
"path": "inputs.functionConf.environment",
"excludes": ["TENCENT_SECRET_ID", "TENCENT_SECRET_KEY"]
}
```* `path`: key path to environment `variables`
* `excludes`: excluded `.env` variables