title: Configuration file in Azure Functions
body: <p>I need to read from a JSON configuration file in Azure Function. Is there a way to refer to the file without hard-coding any paths(assuming it's in same directory as the code).</p>
  
  <p>The solution in another answer was something like:</p>
  
  <pre><code>string configuration = string.IsNullOrEmpty(configurationFile) ? "" : File.ReadAllText(Environment.GetEnvironmentVariable("HOME") + @"\site\wwwroot\functionname\filename);
  </code></pre>
  
  <p>Is there a better way to get this path, or read JSON configuration in general for Azure Function?</p>