Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acryps/environment

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acryps/environment

Environment variable manager for local development

  • 2.2.0
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by950%
Maintainers
3
Weekly downloads
 
Created
Source

acryps environment

Environment variable manager for local development

Getting Started

npm install @acryps/environment --save-dev

Active environment by adding environment before launching your application in your scripts (will work with any tool)

tsc && node index.jstsc && environment node index.js

Define environment variables in your package.json

{
	"name": "my-application",
	"environment": {
		"host": "Application Host",
		"database": {
			"host": "Database Host",
			"+port?5432": "Database Port"
		}
	}
}

You'll automatically be prompted to enter the values required for your project. The following environment variables will automatically be passed as environment variables to the application launched by environment:

  • HOST
  • DATABASE_HOST
  • DATABASE_PORT

Access them as usual with process.env.HOST - no changes to the code required.

Modifiers

Modifiers may be added to the names in the package configuration

  • …?default: Set a default value which will be accepted when the user does not provide a value
  • +…: Require a numeric value

Adding an uppercase letter in the variables name will automatically be expanded with a _: accessKeyACCESS_KEY

Exporting

Export the current environment for another user by using

environment --export

The current settings can be exported for vlcluster by running

environment --export-cluster

More exporters will be added at some point :)

FAQs

Package last updated on 04 Sep 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc