Coder Social home page Coder Social logo

platypussdivva / serverless-dotenv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimdo/serverless-dotenv

0.0 1.0 0.0 34 KB

⚡️ Serverless Framework Plugin - Fetch environment variables and write it to a .env file

Home Page: https://www.npmjs.com/package/@jimdo/serverless-dotenv

License: MIT License

JavaScript 100.00%

serverless-dotenv's Introduction

⚡️ Serverless Plugin Dotenv

npm license Coveralls

About the plugin

This serverless plugin generates a .env file based on the environment variables in the serverless.yml. The idea is to use this environment variables for further tasks like integration tests etc. It works great with serverless offline, so you can start serverless offline, the plugin will hook into the process and create the .env file. You will find the .env file in the .serverless folder of your project.

It will collect the global environment variables of the poject as well as all environment variables of the functions. It will also add API_ENDPOINT and IS_OFFLINE to your environment if you run the plugin via serverless offline.

Usage

Add the npm package to your project:

# Via yarn
$ yarn add @jimdo/serverless-dotenv

# Via npm
$ npm instal @jimdo/serverless-dotenv --save

Add the plugin to your serverless.yml:

plugins:
  - '@jimdo/serverless-dotenv'

That's it! You can now type serverless dotenv in your terminal to generate the .env file based on your serverless configuration. Alternative you can just start serverless offline to generate it.

Contribution

Feel free to contribute to this project! Our JavaScript is written based on standardJS. We recommend to use a standardJS plugin for your Editor, but you can also lint your code with yarn run lint - respectively npm run lint. Please don't forget to add unit and/or integration tests. Thanks <3

serverless-dotenv's People

Contributors

sbstjn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.