Skip to content

Conversation

@Kofro
Copy link
Collaborator

@Kofro Kofro commented Dec 12, 2022

You were right to use the process.env value instead of the hardcoded value in initialState @BytePhoenixCoding #107

I changed the code to get the daysToLock value from the environment.

You can set the DAYS_TO_LOCK environment variable to the desired value, and the code will use that value instead of the hardcoded default.

Note that this will only work if the environment variable is set before the code is executed. You can set environment variables using the process.env object, like this:

process.env.DAYS_TO_LOCK = 7;

Alternatively, we can use a library like dotenv to load environment variables from a file. This can be useful since we have many environment variables to set.

You were right to use the process.env value instead of the hardcoded value in initialState @BytePhoenixCoding #107 

I changed the code to get the daysToLock value from the environment.

You can set the DAYS_TO_LOCK environment variable to the desired value, and the code will use that value instead of the hardcoded default.


Note that this will only work if the environment variable is set before the code is executed. You can set environment variables using the process.env object, like this:

process.env.DAYS_TO_LOCK = 7;

Alternatively, we can use a library like 'dotenv' to load environment variables from a file. This can be useful since we have many environment variables to set.
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

Successfully merging this pull request may close these issues.

2 participants