Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ cdEnv Public

cdEnv is a self-hostable and secured system for storing keys and variables for different environments and projects. It allows easy access via HTTP API and CLI.

License

teezzan/cdEnv

Repository files navigation

cdEnv

Securely store and access API tokens, passwords, encryption keys and other things as environment variables via CLI or HTTP API.

Logo

cdEnv is a self-hostable and secured system for storing keys and variables for different environments and projects. It allows easy access via HTTP API and CLI.

Having various development environments on different platforms and you needing to update their keys and variables one by one could be a chore. cdEnv allows you to have complete control over your data and help serve it across the different environments, local or in the cloud.

GitHub license Moleculer

Screenshots/Demo

ScreenShot

Built With

Features

  • Light-Weight
  • User based Access
  • Environment Based Access
  • Data is Encrypted at Rest
  • Generation and Revoking of access tokens.
  • Works anywhere you have internet access.

Example Code

The variables in an environment can be accessed as a key:value pair via an HTTP API request to the hosted app. A library was developed to do this and many more. It is as simple as

let cdenv = require('cdenv');
cdenv.fetch('API-TOKEN-GENERATED-FROM-SERVER','APP-ENVIRONMENT-NAME', "URL_TO_SERVER_INSTANCE");

where API-TOKEN-GENERATED-FROM-SERVER is your user generated secret token, APP-ENVIRONMENT-NAME is the name of your environment on the server and URL_TO_SERVER_INSTANCE is the url to access your server instance running cdEnv.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

If you prefer Docker for live deployment, Docker is important.

Installation

To get started, you would need to create a local copy (clone) of the code on your machine. This is done by executing

git clone https://github.com/teezzan/cdEnv

Next is to enter the directory and install the required library. This can be done by the following.

cd cdEnv
npm install

Make a copy of the .env.copy file, rename it as .env and populate it appropriately.

NOTE:

MAIL_USER and MAIL_PASS are the username and password of a gmail account used to send confirmaation emails. If SEND_CONFIRMATION_MAIL is set to false, you don't have to populate MAIL_USER and MAIL_PASS.

Start the project with npm run dev command. You should find the user interface at http://localhost:3000/ URL in your browser.

NPM scripts

  • npm run dev: Start development mode (load all services locally with hot-reload & REPL)
  • npm run start: Start production mode (set SERVICES env variable to load certain services)

Useful links

API Reference/Documentation

TBD

Deployment

To deploy on a live system, ensure you have Docker installed. Ensure you have copied and edited the .env file appropriately. To expose the containers PORT 3000 to the machines PORT 4000, run

docker run --env-file .env -p 4000:3000  teehazzan/cdenv

Contributing

Issues and pull requests are welcome at cdEnv. This project is intended to be safe, welcoming, and open for collaboration. Users are expected to adhere to the Contributor Covenant code of conduct. We are all human.

Authors

Taiwo Yusuf

Acknowledgments

Meg Gutshall for her README template. Helped a lot.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

cdEnv is a self-hostable and secured system for storing keys and variables for different environments and projects. It allows easy access via HTTP API and CLI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published