Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored configuration/environment variable support #2

Closed
desmondmorris opened this issue Oct 30, 2014 · 6 comments
Closed

Stored configuration/environment variable support #2

desmondmorris opened this issue Oct 30, 2014 · 6 comments

Comments

@desmondmorris
Copy link
Contributor

It would be nice to have a way of storing and associating key/pair settings within my account. These settings would then be available as env variables and accessible via process.env within hooks I have ownership of.

Use case: Lets say I want to write a hook that talks to an api. I do not want to pass the api key as a query param or post data to the hook. I would instead grab it from the env var.

An example - https://gist.github.com/desmondmorris/aa4628375ba9b38adffb

@Marak
Copy link
Collaborator

Marak commented Oct 31, 2014

I understand. Environment variables for hooks is a pretty critical feature.

I'm glad someone requested it! I should be able to have something working by early next week. I'll update this issue when env vars are online.

@Marak
Copy link
Collaborator

Marak commented Oct 31, 2014

@desmondmorris - I've gone ahead and added the ability to set environment variables for hooks.

You can set key / value pairs for the Hook Environment by visiting http://hook.io/env

Once a pair is defined here it will be accessible to all of your hooks through Hook.env.

I tested it out and everything appears to be working. Try it out on the live site and let me know if this is working for you.

I choose Hook.env over process.env to help ensure future compatibility with our virtualization strategy and to keep things a bit more organized.

@desmondmorris
Copy link
Contributor Author

whoa. that was fast. when do you sleep?

I will give this a go today.

@Marak
Copy link
Collaborator

Marak commented Oct 31, 2014

It only took about an hour.

The Big application framework ( which hook.io is built on ) has gotten much
more mature.

On Fri, Oct 31, 2014 at 3:56 PM, Desmond Morris notifications@github.com
wrote:

whoa. that was fast. when do you sleep?

I will give this a go today.


Reply to this email directly or view it on GitHub
#2 (comment).

@desmondmorris
Copy link
Contributor Author

I switched out process.env for hook.env here and confirm that this is working. This is great. Thanks

(i will take another look at the Big stack. Its been a while since I checked it out)

@Marak
Copy link
Collaborator

Marak commented Oct 31, 2014

Awesome! Thanks for your contribution.

@Marak Marak closed this as completed Oct 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants