0.1.3 • Published 1 year ago

adonis-secrets v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

adonis-secrets

Safely store your AdonisJS environment variables in your repositories

PRs Welcome License

adonis-secrets

🔨 Install🚀 Get started🔧 Environments

ContributeLicense

Introduction

This AdonisJS library allows you to safely store your environment variable files in your repository by bringing two commands env:encrypt and env:decrypt. It is heavily inspired by the popular framework Laravel.

🔨 Install

node ace add adonis-secrets

🚀 Get started

You can encrypt your local environment file (.env) by using the env:encrypt command. It will create a new file .env.encrypted

node ace env:encrypt

And then decrypt it using env:decrypt.

APP_KEY=myappkey node ace env:decrypt

Under the hood, your files are encrypted using the APP_KEY environment variable. When decrypting a file the variable might not be available (as it might be inside the encrypted file). When it is the case, you have to provide it manually.

🔧 Environments

You might want to store the environment variables of other environments. You can do this by simply using the NODE_ENV variable. This will encrypt/decrypt your .env.[environment] file.

NODE_ENV=staging APP_KEY=myappkey node ace env:encrypt
NODE_ENV=staging APP_KEY=myappkey node ace env:decrypt

When providing development or nothing it will default to the .env file.

⚠ For security reasons, make sure you a different key for each environment.

Contributing

I'd love for you to contribute to this project. You can request new features by creating an issue, or submit a pull request with your contribution.

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago