Vscode-restclient: Native .env file support?

Created on 13 Sep 2019  路  8Comments  路  Source: Huachao/vscode-restclient

I'm using .env files to do all of my secret hiding. It kinda stinks to have to translate the values to JSON in the settings folder. Is it feasible/possible to be able to access .env file values at the root of the folder to be accessible by the extension? Maybe via {{$dotenv PORT}} for a file named .env and {{$dotenvLocal PORT}} for a .env.local file?

feature request

Most helpful comment

@mattwaler @Ruegen @yfwz100 @devalnor I have supported the {{$dotenv variableName}} syntax, and you just need to put the .env file in the same folder of your .http file. However, .env.local file is not supported currently.

All 8 comments

@mattwaler nice suggestion, I will implement it and update in this thread later

@mattwaler @Ruegen @yfwz100 @devalnor I have supported the {{$dotenv variableName}} syntax, and you just need to put the .env file in the same folder of your .http file. However, .env.local file is not supported currently.

Awesome! Thank you so much for this amazing extension.

@mattwaler @Ruegen @yfwz100 @devalnor you can try the latest version 0.23.0 to verify it.

It works, Thanks!

Is the use case of {{$dotenv variableName}} in an environment variable value supported?

@tomdavidson Yes, when the .env file and .http file are in the same directory this works as intended.

@mattwaler thanks, ill open up a new issue then - #489

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olivier-voutat picture olivier-voutat  路  23Comments

Odonno picture Odonno  路  22Comments

symbioticKid picture symbioticKid  路  28Comments

Fed29 picture Fed29  路  13Comments

wboyle-erwin picture wboyle-erwin  路  43Comments