21 lines
427 B
C#
21 lines
427 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BinaryDad.Notes.Controllers;
|
|
|
|
public class HomeController : Controller
|
|
{
|
|
private readonly string filePath;
|
|
|
|
public HomeController(IConfiguration configuration)
|
|
{
|
|
filePath = configuration["ContentFilePath"];
|
|
}
|
|
|
|
public IActionResult Index()
|
|
{
|
|
var content = System.IO.File.ReadAllText(filePath);
|
|
|
|
return View((object)content);
|
|
}
|
|
}
|