Description Usage Arguments Details Value Examples
DecoupleR currently supports only .env files. 'get_config' will search if the speficied directory and its parent a '.env' file. If no file is found, a empty list is returned.
1 | get_config(path = NULL)
|
path |
a path from where a config if searched for. Parent directories will be evaluated if no config file is found is the specified directory. If NULL, the current directory will be taken as default. |
## Env file:
Simply create a .env text file on your repository's root directory in the form:
1 2 3 4 5 6 | DEBUG=True
TEMPLATE_DEBUG=True
SECRET_KEY=ARANDOMSECRETKEY
DATABASE_URL=mysql://myuser:mypassword@myhost/mydatabase
PERCENTILE=90
#COMMENTED=42
|
a list with variables / values from config file. If no config file has been found, an empyt list is returned.
1 2 | config <- get_config()
config
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.